/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmEvalsRetryFailedRun } from "../../funcs/llmEvalsRetryFailedRun.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.RetryFailedEvalRunRequest$inboundSchema, }; export const tool$llmEvalsRetryFailedRun: ToolDefinition = { name: "llm-evals-retry-failed-run", description: `Retry an eval run Queues a failed or cancelled eval run to retry in place. Completed samples keep their results, generated-but-unscored cancelled samples resume at scoring, unfinished samples are requeued, and runs with no persisted samples are prepared from scratch with the same run ID.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmEvalsRetryFailedRun( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };