Interface: ChatEngine<R, AR>
A ChatEngine is used to handle back and forth chats between the application and the LLM.
Type parameters
Name | Type |
---|---|
R | Response |
AR | extends AsyncIterable <unknown > = AsyncIterable <R > |
Implemented by
Methods
chat
▸ chat(params
): Promise
<AR
>
Send message along with the class's current chat history to the LLM.
Parameters
Name | Type |
---|---|
params | ChatEngineParamsStreaming |
Returns
Promise
<AR
>
Defined in
packages/core/src/engines/chat/types.ts:39
▸ chat(params
): Promise
<R
>
Parameters
Name | Type |
---|---|
params | ChatEngineParamsNonStreaming |
Returns
Promise
<R
>
Defined in
packages/core/src/engines/chat/types.ts:40
reset
▸ reset(): void
Resets the chat history so that it's empty.
Returns
void