UNPKG

@huggingface/mcp-client

Version:
27 lines 1.14 kB
import type { InferenceProviderOrPolicy } from "@huggingface/inference"; import type { ChatCompletionInputMessageTool } from "./McpClient"; import { McpClient } from "./McpClient"; import type { ChatCompletionInputMessage, ChatCompletionStreamOutput } from "@huggingface/tasks"; import type { StdioServerParameters } from "@modelcontextprotocol/sdk/client/stdio"; import type { ServerConfig } from "./types"; export declare class Agent extends McpClient { private readonly servers; protected messages: ChatCompletionInputMessage[]; constructor({ provider, endpointUrl, model, apiKey, servers, prompt, }: ({ provider: InferenceProviderOrPolicy; endpointUrl?: undefined; } | { endpointUrl: string; provider?: undefined; }) & { model: string; apiKey: string; servers: (ServerConfig | StdioServerParameters)[]; prompt?: string; }); loadTools(): Promise<void>; run(input: string, opts?: { abortSignal?: AbortSignal; }): AsyncGenerator<ChatCompletionStreamOutput | ChatCompletionInputMessageTool>; } //# sourceMappingURL=Agent.d.ts.map