Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:33
CondenseQuestionChatEngine is used in conjunction with a Index (for example VectorStoreIndex). It does two steps on taking a user's chat message: first, it condenses the chat message with the previous chat history into a question with more context. Then, it queries the underlying Index using the new question with context and returns the response. CondenseQuestionChatEngine performs well when the input is primarily questions about the underlying data. It performs less well when the chat messages are not questions about the data, or are very referential to previous context.
ExtendsBaseChatEngine
new CondenseQuestionChatEngine(
init
):CondenseQuestionChatEngine
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:43
Parameters init queryEngineBaseQueryEngine
ChatMessage
[]
CondenseQuestionPrompt
CondenseQuestionChatEngine
BaseChatEngine.constructor
queryEngine:
BaseQueryEngine
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:34
memorymemory:
Memory
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:35
llmllm:
LLM
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:36
condenseMessagePromptcondenseMessagePrompt:
CondenseQuestionPrompt
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:37
Accessors chatHistory Get Signatureget chatHistory():
Promise
<ChatMessage
[]>
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:39
ReturnsPromise
<ChatMessage
[]>
BaseChatEngine.chatHistory
protected
_getPromptModules():ModuleRecord
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:57
ReturnsModuleRecord
protected
_getPrompts():object
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:61
Returnsobject
_updatePrompts()condenseMessagePrompt:
CondenseQuestionPrompt
protected
_updatePrompts(promptsDict
):void
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:67
Parameters promptsDict condenseMessagePromptCondenseQuestionPrompt
void
chat(
params
):Promise
<EngineResponse
>
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:86
Parameters paramsNonStreamingChatEngineParams
Promise
<EngineResponse
>
BaseChatEngine.chat
chat(
params
):Promise
<AsyncIterable
<EngineResponse
,any
,any
>>
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:87
Parameters paramsStreamingChatEngineParams
Promise
<AsyncIterable
<EngineResponse
, any
, any
>>
BaseChatEngine.chat
reset():
void
Defined in: packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:132
Returnsvoid
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4