Send gathered references to client after code results calculated

This commit is contained in:
Debanjum Singh Solanky 2024-10-26 05:59:10 -07:00
parent f04f871a72
commit 0f3927e810

View file

@ -973,18 +973,6 @@ async def chat(
):
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:
## Gather Code Results
if ConversationCommand.Code in conversation_commands and pending_research:
@ -1015,6 +1003,18 @@ async def chat(
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 Image Output
if ConversationCommand.Image in conversation_commands: