/** * @zhin.js/ai - Ollama Provider * 支持本地 Ollama 模型 */ import { BaseProvider } from './base.js'; import type { ProviderConfig, ChatCompletionRequest, ChatCompletionResponse, ChatCompletionChunk } from '../types.js'; export interface OllamaConfig extends ProviderConfig { host?: string; models?: string[]; /** Ollama 上下文窗口大小(token 数),默认 32768。影响多轮对话和技能指令的保持能力 */ num_ctx?: number; } export declare class OllamaProvider extends BaseProvider { name: string; models: string[]; contextWindow: number; capabilities: { vision: boolean; streaming: boolean; toolCalling: boolean; thinking: boolean; }; private host; private numCtx; constructor(config?: OllamaConfig); chat(request: ChatCompletionRequest): Promise; chatStream(request: ChatCompletionRequest): AsyncIterable; listModels(): Promise; /** * 拉取模型 */ pullModel(model: string): Promise; healthCheck(): Promise; } //# sourceMappingURL=ollama.d.ts.map