Logo
Classes

ToolCallLLM

Defined in: packages/core/src/llms/base.ts:324

Unified language model interface

Extends

  • BaseLLM<AdditionalChatOptions, AdditionalMessageOptions>

Type Parameters

AdditionalChatOptions

AdditionalChatOptions extends object = object

AdditionalMessageOptions

AdditionalMessageOptions extends ToolCallLLMMessageOptions = ToolCallLLMMessageOptions

Constructors

Constructor

new ToolCallLLM<AdditionalChatOptions, AdditionalMessageOptions>(): ToolCallLLM<AdditionalChatOptions, AdditionalMessageOptions>

Returns

ToolCallLLM<AdditionalChatOptions, AdditionalMessageOptions>

Inherited from

BaseLLM.constructor

Properties

metadata

abstract metadata: LLMMetadata

Defined in: packages/core/src/llms/base.ts:41

Inherited from

BaseLLM.metadata


supportToolCall

abstract supportToolCall: boolean

Defined in: packages/core/src/llms/base.ts:329

Methods

complete()

Call Signature

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

Defined in: packages/core/src/llms/base.ts:43

Get a prompt completion from the LLM

Parameters
params

LLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse, any, any>>

Inherited from

BaseLLM.complete

Call Signature

complete(params): Promise<CompletionResponse>

Defined in: packages/core/src/llms/base.ts:46

Parameters
params

LLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

Inherited from

BaseLLM.complete


chat()

Call Signature

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

Defined in: packages/core/src/llms/base.ts:78

Get a chat response from the LLM

Parameters
params

LLMChatParamsStreaming<AdditionalChatOptions, AdditionalMessageOptions>

Returns

Promise<AsyncIterable<ChatResponseChunk<AdditionalMessageOptions>, any, any>>

Inherited from

BaseLLM.chat

Call Signature

abstract chat(params): Promise<ChatResponse<AdditionalMessageOptions>>

Defined in: packages/core/src/llms/base.ts:84

Parameters
params

LLMChatParamsNonStreaming<AdditionalChatOptions, AdditionalMessageOptions>

Returns

Promise<ChatResponse<AdditionalMessageOptions>>

Inherited from

BaseLLM.chat


exec()

Call Signature

exec<Z>(params): Promise<ExecStreamResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Defined in: packages/core/src/llms/base.ts:91

Type Parameters
Z

Z extends ZodSchema

Parameters
params

LLMChatParamsStreaming<AdditionalChatOptions, AdditionalMessageOptions, Z>

Returns

Promise<ExecStreamResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Inherited from

BaseLLM.exec

Call Signature

exec<Z>(params): Promise<ExecResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Defined in: packages/core/src/llms/base.ts:98

Type Parameters
Z

Z extends ZodSchema

Parameters
params

LLMChatParamsNonStreaming<AdditionalChatOptions, AdditionalMessageOptions, Z>

Returns

Promise<ExecResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Inherited from

BaseLLM.exec


streamExec()

streamExec<Z>(params): Promise<ExecStreamResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Defined in: packages/core/src/llms/base.ts:181

Type Parameters

Z

Z extends ZodSchema

Parameters

params

LLMChatParamsStreaming<AdditionalChatOptions, AdditionalMessageOptions, Z>

Returns

Promise<ExecStreamResponse<AdditionalMessageOptions, ZodInfer<Z>>>

Inherited from

BaseLLM.streamExec