//native
type Togetherai = {
api_key: string;
};
/**
* List all jobs
* List the metadata for all fine-tuning jobs.
*/
export async function main(auth: Togetherai) {
const url = new URL(`https://api.together.xyz/v1/fine-tunes`);
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: "Bearer " + auth.api_key,
},
body: undefined,
});
if (!response.ok) {
const text = await response.text();
throw new Error(`${response.status} ${text}`);
}
return await response.json();
}
Submitted by hugo697 235 days ago