export type DeleteApiProjectsProjectIdFoundryLorasIdArgs = {project_id: string, id: string}; export type DeleteApiProjectsProjectIdFoundryLorasIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Removes a LoRA adapter deployment from the project. * * DELETE /projects/{project_id}/foundry/loras/{id} */ export const deleteApiProjectsProjectIdFoundryLorasId = async (args: DeleteApiProjectsProjectIdFoundryLorasIdArgs, options?: DeleteApiProjectsProjectIdFoundryLorasIdOptions) => { const {baseUrl = "https://api.cloud.crusoe.ai/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/projects/${encodeURIComponent(String(args.project_id))}/foundry/loras/${encodeURIComponent(String(args.id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };