Logo
Interfaces

LLM

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

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:30

Methods

chat()

Call Signature

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

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

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:40

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:50

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:53

Parameters
params

LLMCompletionParamsNonStreaming

Returns

Promise<CompletionResponse>

On this page