mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 05:39:12 +00:00
Fallback to default agent for chat when unset in get conversation API
This commit is contained in:
@@ -119,6 +119,8 @@ async def get_agent_by_conversation(
|
|||||||
media_type="application/json",
|
media_type="application/json",
|
||||||
status_code=404,
|
status_code=404,
|
||||||
)
|
)
|
||||||
|
if not conversation.agent:
|
||||||
|
agent = await AgentAdapters.aget_default_agent()
|
||||||
|
|
||||||
agent = await AgentAdapters.aget_agent_by_slug(conversation.agent.slug, user)
|
agent = await AgentAdapters.aget_agent_by_slug(conversation.agent.slug, user)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user