export type CreateApiAivmModelsAivmModelUuidUnloadArgs = {aivm_model_uuid: string}; export type CreateApiAivmModelsAivmModelUuidUnloadOptions = {baseUrl: string, fetch?: typeof fetch | undefined}; /** * 指定された音声合成モデルをアンロードする * * POST /aivm_models/{aivm_model_uuid}/unload */ export const createApiAivmModelsAivmModelUuidUnload = async (args: CreateApiAivmModelsAivmModelUuidUnloadArgs, options: CreateApiAivmModelsAivmModelUuidUnloadOptions) => { const {baseUrl, fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/aivm_models/${encodeURIComponent(String(args.aivm_model_uuid))}/unload${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };