UNPKG

@unified-llm/core

Version:

Unified LLM interface (in-memory).

52 lines 1.6 kB
import { Thread } from "../../thread.js"; import type { MCPServerConfig, Logger } from "../../types/index.js"; import type { Usage } from "../../types/usage.js"; import { Clock } from "../../utils/timing.js"; import { type OpenAiTool } from "../../utils/mcp/mcp-tool-catalog.js"; import { type LocalToolHandler } from "../../utils/tools/execute-tool-calls.js"; type StructuredOutput = { format: { type: "json_schema"; name: string; schema: unknown; strict?: boolean; }; }; type TruncationOption = string; /** * Gemini API を用いた Agent 実行(MCP/ローカルツール対応)。 * * 処理概要: * 1) MCP サーバーへ接続して tool catalog を構築 * 2) local tools を合成し、名前衝突等を検査 * 3) runToolCallingLoop で LLM→tool→LLM を回す * 4) 最終レスポンスからテキストのみを抽出して返す */ export declare function callGeminiAgent(options: { model: string; apiKey?: string; endpoint?: string; isStream?: boolean; baseInput: any[]; thread?: Thread; structuredOutput?: StructuredOutput; mcpServers?: MCPServerConfig[]; localTools?: { tools: OpenAiTool[]; handlers: Map<string, LocalToolHandler>; }; config?: { temperature?: number; truncation?: TruncationOption; }; sseCallback?: (event: any) => void; signal?: AbortSignal; logger?: Logger; clock?: Clock; }): Promise<{ output: string | unknown; usage: Usage; rawResponse: unknown; }>; export {}; //# sourceMappingURL=gemini-agent.d.ts.map