Skip to main content

Class: Ollama

Unified language model interface

Extends

Constructors

new Ollama()

new Ollama(params): Ollama

Parameters

params: OllamaParams

Returns

Ollama

Overrides

ToolCallLLM.constructor

Defined in

packages/providers/ollama/dist/index.d.ts:17

Properties

model

model: string

Defined in

packages/providers/ollama/dist/index.d.ts:15


ollama

readonly ollama: Ollama

Defined in

packages/providers/ollama/dist/index.d.ts:14


options

options: Partial<Omit<Options, "temperature" | "top_p" | "num_ctx">> & Pick<Options, "temperature" | "top_p" | "num_ctx">

Defined in

packages/providers/ollama/dist/index.d.ts:16


supportToolCall

supportToolCall: boolean

Overrides

ToolCallLLM.supportToolCall

Defined in

packages/providers/ollama/dist/index.d.ts:13

Accessors

metadata

Get Signature

get metadata(): LLMMetadata

Returns

LLMMetadata

Overrides

ToolCallLLM.metadata

Defined in

packages/providers/ollama/dist/index.d.ts:18

Methods

chat()

chat(params)

chat(params): Promise<AsyncIterable<ChatResponseChunk, any, any>>

Get a chat response from the LLM

Parameters

params: LLMChatParamsStreaming<ToolCallLLMMessageOptions, object>

Returns

Promise<AsyncIterable<ChatResponseChunk, any, any>>

Overrides

ToolCallLLM.chat

Defined in

packages/providers/ollama/dist/index.d.ts:19

chat(params)

chat(params): Promise<ChatResponse<ToolCallLLMMessageOptions>>

Parameters

params: LLMChatParamsNonStreaming<ToolCallLLMMessageOptions, object>

Returns

Promise<ChatResponse<ToolCallLLMMessageOptions>>

Overrides

ToolCallLLM.chat

Defined in

packages/providers/ollama/dist/index.d.ts:20


complete()

complete(params)

complete(params): Promise<AsyncIterable<CompletionResponse, any, any>>

Get a prompt completion from the LLM

Parameters

params: LLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse, any, any>>

Overrides

ToolCallLLM.complete

Defined in

packages/providers/ollama/dist/index.d.ts:21

complete(params)

complete(params): Promise<CompletionResponse>

Parameters

params: LLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Overrides

ToolCallLLM.complete

Defined in

packages/providers/ollama/dist/index.d.ts:22


toTool()

static toTool(tool): Tool

Parameters

tool: BaseTool<any>

Returns

Tool

Defined in

packages/providers/ollama/dist/index.d.ts:23