mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Make async call to get agent files from async agent/conversation API
This should avoid the sync_to_async errors thrown by django when calling the /api/agent/conversation API endpoint
This commit is contained in:
@@ -138,7 +138,7 @@ async def get_agent_by_conversation(
|
|||||||
else:
|
else:
|
||||||
agent_chat_model = None
|
agent_chat_model = None
|
||||||
|
|
||||||
has_files = agent.fileobject_set.exists()
|
has_files = await agent.fileobject_set.aexists()
|
||||||
|
|
||||||
agents_packet = {
|
agents_packet = {
|
||||||
"slug": agent.slug,
|
"slug": agent.slug,
|
||||||
|
|||||||
Reference in New Issue
Block a user