export type DeleteApiApiV0AgentEvalsBenchmarksBenchmarkIdArgs = {benchmark_id: string}; export type DeleteApiApiV0AgentEvalsBenchmarksBenchmarkIdOptions = {baseUrl: string, HTTPBearer?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete Benchmark * * DELETE /api/v0/agent/evals/benchmarks/{benchmark_id} */ export const deleteApiApiV0AgentEvalsBenchmarksBenchmarkId = async (args: DeleteApiApiV0AgentEvalsBenchmarksBenchmarkIdArgs, options: DeleteApiApiV0AgentEvalsBenchmarksBenchmarkIdOptions) => { const {baseUrl, fetch: fetchFn = fetch, HTTPBearer} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (HTTPBearer !== undefined) headers.set('authorization', `Bearer ${HTTPBearer}`) const url = `${baseUrl.replace(/\/+$/, '')}/api/v0/agent/evals/benchmarks/${encodeURIComponent(String(args.benchmark_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 };