Chat coverage

This commit is contained in:
shamoon
2025-04-26 01:18:37 -07:00
parent 4cdc629e3d
commit b3b9a8fb5b
2 changed files with 144 additions and 1 deletions

View File

@@ -37,7 +37,8 @@ def stream_chat_with_documents(query_str: str, documents: list[Document]):
if len(nodes) == 0:
logger.warning("No nodes found for the given documents.")
return "Sorry, I couldn't find any content to answer your question."
yield "Sorry, I couldn't find any content to answer your question."
return
local_index = VectorStoreIndex(nodes=nodes)
retriever = local_index.as_retriever(