mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Send gathered references to client after code results calculated
This commit is contained in:
@@ -973,18 +973,6 @@ async def chat(
|
|||||||
):
|
):
|
||||||
yield result
|
yield result
|
||||||
|
|
||||||
## Send Gathered References
|
|
||||||
async for result in send_event(
|
|
||||||
ChatEvent.REFERENCES,
|
|
||||||
{
|
|
||||||
"inferredQueries": inferred_queries,
|
|
||||||
"context": compiled_references,
|
|
||||||
"onlineContext": online_results,
|
|
||||||
"codeContext": code_results,
|
|
||||||
},
|
|
||||||
):
|
|
||||||
yield result
|
|
||||||
|
|
||||||
if pending_research:
|
if pending_research:
|
||||||
## Gather Code Results
|
## Gather Code Results
|
||||||
if ConversationCommand.Code in conversation_commands and pending_research:
|
if ConversationCommand.Code in conversation_commands and pending_research:
|
||||||
@@ -1015,6 +1003,18 @@ async def chat(
|
|||||||
exc_info=True,
|
exc_info=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
## Send Gathered References
|
||||||
|
async for result in send_event(
|
||||||
|
ChatEvent.REFERENCES,
|
||||||
|
{
|
||||||
|
"inferredQueries": inferred_queries,
|
||||||
|
"context": compiled_references,
|
||||||
|
"onlineContext": online_results,
|
||||||
|
"codeContext": code_results,
|
||||||
|
},
|
||||||
|
):
|
||||||
|
yield result
|
||||||
|
|
||||||
# Generate Output
|
# Generate Output
|
||||||
## Generate Image Output
|
## Generate Image Output
|
||||||
if ConversationCommand.Image in conversation_commands:
|
if ConversationCommand.Image in conversation_commands:
|
||||||
|
|||||||
Reference in New Issue
Block a user