Class: ContextChatEngine
ContextChatEngine uses the Index to get the appropriate context for each query. The context is stored in the system prompt, and the chat history is preserved, ideally allowing the appropriate context to be surfaced for each query.
Extends
Implements
Constructors
new ContextChatEngine()
new ContextChatEngine(
init
):ContextChatEngine
Parameters
• init
• init.chatHistory?: ChatMessage
[]
• init.chatModel?: LLM
<object
, object
>
• init.contextSystemPrompt?
• init.nodePostprocessors?: BaseNodePostprocessor
[]
• init.retriever: BaseRetriever
Returns
Overrides
Source
packages/core/src/engines/chat/ContextChatEngine.ts:35
Properties
chatHistory
chatHistory:
ChatHistory
<object
>
Source
packages/core/src/engines/chat/ContextChatEngine.ts:32
chatModel
chatModel:
LLM
<object
,object
>
Source
packages/core/src/engines/chat/ContextChatEngine.ts:31
contextGenerator
contextGenerator:
ContextGenerator
Source
packages/core/src/engines/chat/ContextChatEngine.ts:33
Methods
_getPromptModules()
protected
_getPromptModules():Record
<string
,ContextGenerator
>