//native
type Togetherai = {
api_key: string;
};
/**
* List job
* List the metadata for a single fine-tuning job.
*/
export async function main(auth: Togetherai, id: string) {
const url = new URL(`https://api.together.xyz/v1/fine-tunes/${id}`);
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