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

Class: SimpleChatEngine

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

Implements

Constructors

new SimpleChatEngine()

new SimpleChatEngine(init?): SimpleChatEngine

Parameters

init?: Partial <SimpleChatEngine>

Returns

SimpleChatEngine

Source

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

Properties

chatHistory

chatHistory: ChatHistory<object>

Source

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


llm

llm: LLM<object, object>

Source

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

Methods

chat()

chat(params)

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

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

Parameters

params: ChatEngineParamsStreaming

Returns

Promise<AsyncIterable <Response>>

Implementation of

ChatEngine . chat

Source

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

chat(params)

chat(params): Promise <Response>

Parameters

params: ChatEngineParamsNonStreaming

Returns

Promise <Response>

Implementation of

ChatEngine . chat

Source

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


reset()

reset(): void

Resets the chat history so that it's empty.

Returns

void

Implementation of

ChatEngine . reset

Source

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