BaseLLM
Defined in: .build/typescript/packages/core/src/llms/base.ts:36
Unified language model interface
Extended by
Section titled “Extended by”Type Parameters
Section titled “Type Parameters”AdditionalChatOptions
Section titled “AdditionalChatOptions”AdditionalChatOptions
extends object
= object
AdditionalMessageOptions
Section titled “AdditionalMessageOptions”AdditionalMessageOptions
extends object
= object
Implements
Section titled “Implements”LLM
<AdditionalChatOptions
>
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BaseLLM<
AdditionalChatOptions
,AdditionalMessageOptions
>():BaseLLM
<AdditionalChatOptions
,AdditionalMessageOptions
>
Returns
Section titled “Returns”BaseLLM
<AdditionalChatOptions
, AdditionalMessageOptions
>
Properties
Section titled “Properties”metadata
Section titled “metadata”
abstract
metadata:LLMMetadata
Defined in: .build/typescript/packages/core/src/llms/base.ts:41
Implementation of
Section titled “Implementation of”Methods
Section titled “Methods”complete()
Section titled “complete()”Call Signature
Section titled “Call Signature”complete(
params
):Promise
<AsyncIterable
<CompletionResponse
,any
,any
>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:43
Get a prompt completion from the LLM
Parameters
Section titled “Parameters”params
Section titled “params”Returns
Section titled “Returns”Promise
<AsyncIterable
<CompletionResponse
, any
, any
>>
Implementation of
Section titled “Implementation of”Call Signature
Section titled “Call Signature”complete(
params
):Promise
<CompletionResponse
>
Defined in: .build/typescript/packages/core/src/llms/base.ts:46
Parameters
Section titled “Parameters”params
Section titled “params”LLMCompletionParamsNonStreaming
Returns
Section titled “Returns”Promise
<CompletionResponse
>
Implementation of
Section titled “Implementation of”chat()
Section titled “chat()”Call Signature
Section titled “Call Signature”
abstract
chat(params
):Promise
<AsyncIterable
<ChatResponseChunk
<AdditionalMessageOptions
>,any
,any
>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:78
Get a chat response from the LLM
Parameters
Section titled “Parameters”params
Section titled “params”LLMChatParamsStreaming
<AdditionalChatOptions
, AdditionalMessageOptions
>
Returns
Section titled “Returns”Promise
<AsyncIterable
<ChatResponseChunk
<AdditionalMessageOptions
>, any
, any
>>
Implementation of
Section titled “Implementation of”Call Signature
Section titled “Call Signature”
abstract
chat(params
):Promise
<ChatResponse
<AdditionalMessageOptions
>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:84
Parameters
Section titled “Parameters”params
Section titled “params”LLMChatParamsNonStreaming
<AdditionalChatOptions
, AdditionalMessageOptions
>
Returns
Section titled “Returns”Promise
<ChatResponse
<AdditionalMessageOptions
>>
Implementation of
Section titled “Implementation of”exec()
Section titled “exec()”Call Signature
Section titled “Call Signature”exec<
Z
>(params
):Promise
<ExecStreamResponse
<AdditionalMessageOptions
,ZodInfer
<Z
>>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:91
Type Parameters
Section titled “Type Parameters”Z
extends ZodSchema
Parameters
Section titled “Parameters”params
Section titled “params”LLMChatParamsStreaming
<AdditionalChatOptions
, AdditionalMessageOptions
, Z
>
Returns
Section titled “Returns”Promise
<ExecStreamResponse
<AdditionalMessageOptions
, ZodInfer
<Z
>>>
Call Signature
Section titled “Call Signature”exec<
Z
>(params
):Promise
<ExecResponse
<AdditionalMessageOptions
,ZodInfer
<Z
>>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:98
Type Parameters
Section titled “Type Parameters”Z
extends ZodSchema
Parameters
Section titled “Parameters”params
Section titled “params”LLMChatParamsNonStreaming
<AdditionalChatOptions
, AdditionalMessageOptions
, Z
>
Returns
Section titled “Returns”Promise
<ExecResponse
<AdditionalMessageOptions
, ZodInfer
<Z
>>>
streamExec()
Section titled “streamExec()”streamExec<
Z
>(params
):Promise
<ExecStreamResponse
<AdditionalMessageOptions
,ZodInfer
<Z
>>>
Defined in: .build/typescript/packages/core/src/llms/base.ts:181
Type Parameters
Section titled “Type Parameters”Z
extends ZodSchema
Parameters
Section titled “Parameters”params
Section titled “params”LLMChatParamsStreaming
<AdditionalChatOptions
, AdditionalMessageOptions
, Z
>
Returns
Section titled “Returns”Promise
<ExecStreamResponse
<AdditionalMessageOptions
, ZodInfer
<Z
>>>