/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { documentsIndexMultimodal } from "../../funcs/documentsIndexMultimodal.js"; import * as components from "../../models/components/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: components.IndexMultimodalRequest$inboundSchema, }; export const tool$documentsIndexMultimodal: ToolDefinition = { name: "documents-index-multimodal", description: `Index a document from an image and text content Index a document into the specified index by providing the image and text content as a JSON object.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await documentsIndexMultimodal( 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); }, };