Skip to content

CondenseQuestionChatEngine

Defined in: .build/typescript/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.

  • BaseChatEngine

new CondenseQuestionChatEngine(init): CondenseQuestionChatEngine

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:43

BaseQueryEngine

ChatMessage[]

CondenseQuestionPrompt

CondenseQuestionChatEngine

BaseChatEngine.constructor

queryEngine: BaseQueryEngine

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:34


memory: Memory

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:35


llm: LLM

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:36


condenseMessagePrompt: CondenseQuestionPrompt

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:37

get chatHistory(): Promise<ChatMessage[]>

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:39

Promise<ChatMessage[]>

BaseChatEngine.chatHistory

protected _getPromptModules(): ModuleRecord

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:57

ModuleRecord


protected _getPrompts(): object

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:61

object

condenseMessagePrompt: CondenseQuestionPrompt


protected _updatePrompts(promptsDict): void

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:67

CondenseQuestionPrompt

void


chat(params): Promise<EngineResponse>

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:86

NonStreamingChatEngineParams

Promise<EngineResponse>

BaseChatEngine.chat

chat(params): Promise<AsyncIterable<EngineResponse, any, any>>

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:87

StreamingChatEngineParams

Promise<AsyncIterable<EngineResponse, any, any>>

BaseChatEngine.chat


reset(): void

Defined in: .build/typescript/packages/llamaindex/src/engines/chat/CondenseQuestionChatEngine.ts:132

void