import { BaseEmbedding } from "../embeddings/types.js"; import { Ollama as OllamaBase, type Config, type CopyRequest, type CreateRequest, type DeleteRequest, type EmbeddingsRequest, type EmbeddingsResponse, type GenerateRequest, type ListResponse, type GenerateResponse as OllamaGenerateResponse, type Options, type ProgressResponse, type PullRequest, type PushRequest, type ShowRequest, type ShowResponse, type StatusResponse } from "../internal/deps/ollama.js"; import type { ChatResponse, ChatResponseChunk, CompletionResponse, LLM, LLMChatParamsNonStreaming, LLMChatParamsStreaming, LLMCompletionParamsNonStreaming, LLMCompletionParamsStreaming, LLMMetadata } from "./types.js"; export type OllamaParams = { model: string; config?: Partial; options?: Partial; }; /** * This class both implements the LLM and Embedding interfaces. */ export declare class Ollama extends BaseEmbedding implements LLM, Omit { readonly hasStreaming = true; ollama: OllamaBase; model: string; options: Partial> & Pick; constructor(params: OllamaParams); get metadata(): LLMMetadata; chat(params: LLMChatParamsStreaming): Promise>; chat(params: LLMChatParamsNonStreaming): Promise; complete(params: LLMCompletionParamsStreaming): Promise>; complete(params: LLMCompletionParamsNonStreaming): Promise; private getEmbedding; getTextEmbedding(text: string): Promise; push(request: PushRequest & { stream: true; }): Promise>; push(request: PushRequest & { stream?: false | undefined; }): Promise; abort(): void; encodeImage(image: string | Uint8Array): Promise; generate(request: GenerateRequest & { stream: true; }): Promise>; generate(request: GenerateRequest & { stream?: false | undefined; }): Promise; create(request: CreateRequest & { stream: true; }): Promise>; create(request: CreateRequest & { stream?: false | undefined; }): Promise; pull(request: PullRequest & { stream: true; }): Promise>; pull(request: PullRequest & { stream?: false | undefined; }): Promise; delete(request: DeleteRequest): Promise; copy(request: CopyRequest): Promise; list(): Promise; show(request: ShowRequest): Promise; embeddings(request: EmbeddingsRequest): Promise; }