メインコンテンツまでスキップ

Class: SimpleChatEngine

SimpleChatEngine is the simplest possible chat engine. Useful for using your own custom prompts.

Implements

Constructors

constructor

new SimpleChatEngine(init?): SimpleChatEngine

Parameters

NameType
init?Partial<SimpleChatEngine>

Returns

SimpleChatEngine

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:21

Properties

chatHistory

chatHistory: ChatHistory

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:18


llm

llm: LLM

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:19

Methods

chat

chat(params): Promise<AsyncIterable<Response>>

Send message along with the class's current chat history to the LLM.

Parameters

NameType
paramsChatEngineParamsStreaming

Returns

Promise<AsyncIterable<Response>>

Implementation of

ChatEngine.chat

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:26

chat(params): Promise<Response>

Parameters

NameType
paramsChatEngineParamsNonStreaming

Returns

Promise<Response>

Implementation of

ChatEngine.chat

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:27


reset

reset(): void

Resets the chat history so that it's empty.

Returns

void

Implementation of

ChatEngine.reset

Defined in

packages/core/src/engines/chat/SimpleChatEngine.ts:63