mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +01:00
Send gathered references to client after code results calculated
This commit is contained in:
parent
f04f871a72
commit
0f3927e810
1 changed files with 12 additions and 12 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue