Got a few questions:
1) is there anything special I need to do to go from
as_query_engine
call to a
as_chat_engine
call?
meaning:
query_engine = index.as_query_engine(
node_postprocessors=[SentenceEmbeddingOptimizer(threshold_cutoff=threshold_cutoff,percentile_cutoff=percentile_cutoff)],
retriever_mode="embedding",
service_context=service_context,
similarity_top_k=similarity_top_k,
streaming=True,
text_qa_template=qa_template
)
if I just change that to
.as_chat_engine
will all those features work just fine?
2) if I'm setting
streaming=True
in the above (#1), then why do I need to call
.stream_chat
instead of
.chat
? 🤔 shouldn't it already know that?
3) my coworker attempted to use the class directly:
chat_engine = CondenseQuestionChatEngine.from_defaults(
query_engine=query_engine,
condense_question_prompt=custom_prompt,
streaming=True
)
but it is unhappy about the return value from
.stream_chat
not being iterable (meaning it is not a streaming response) so... is that just not the/a proper way to do that?