Logo
Interfaces

LLM

Defined in: packages/core/src/llms/type.ts:25

Unified language model interface

Extends

Type Parameters

AdditionalChatOptions

AdditionalChatOptions extends object = object

AdditionalMessageOptions

AdditionalMessageOptions extends object = object

Properties

metadata

metadata: LLMMetadata

Defined in: packages/core/src/llms/type.ts:29

Methods

chat()

Call Signature

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

Defined in: packages/core/src/llms/type.ts:33

Get a chat response from the LLM

Parameters
params

LLMChatParamsStreaming<AdditionalChatOptions, AdditionalMessageOptions>

Returns

Promise<AsyncIterable<ChatResponseChunk<object>, any, any>>

Overrides

LLMChat.chat

Call Signature

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

Defined in: packages/core/src/llms/type.ts:39

Parameters
params

LLMChatParamsNonStreaming<AdditionalChatOptions, AdditionalMessageOptions>

Returns

Promise<ChatResponse<AdditionalMessageOptions>>

Overrides

LLMChat.chat


complete()

Call Signature

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

Defined in: packages/core/src/llms/type.ts:49

Get a prompt completion from the LLM

Parameters
params

LLMCompletionParamsStreaming

Returns

Promise<AsyncIterable<CompletionResponse, any, any>>

Call Signature

complete(params): Promise<CompletionResponse>

Defined in: packages/core/src/llms/type.ts:52

Parameters
params

LLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

On this page