UNPKG

@genkit-ai/anthropic

Version:

Genkit AI framework plugin for Anthropic APIs.

28 lines 758 B
import { convertDocumentSource, createDocumentBlock } from "./shared.mjs"; function serverToolUseBlockToPart(block) { return { text: `[Anthropic server tool ${block.name}] input: ${JSON.stringify(block.input)}`, metadata: { anthropicServerToolUse: { id: block.id, name: block.name, input: block.input } } }; } function toDocumentBlock(options) { return createDocumentBlock( options, (source) => convertDocumentSource(source, () => { throw new Error( 'File-based document sources require the beta API. Set apiVersion: "beta" in your plugin config or request config.' ); }) ); } export { serverToolUseBlockToPart, toDocumentBlock }; //# sourceMappingURL=stable.mjs.map