/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmFilesUpload } from "../../funcs/llmFilesUpload.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.UploadFileRequest$inboundSchema, }; export const tool$llmFilesUpload: ToolDefinition = { name: "llm-files-upload", description: `Upload file Upload a file that can be used with Assistants, Vector Stores, and other features. Files are uploaded to S3 for durable storage.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmFilesUpload( 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); }, };