mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-05 05:39:11 +00:00
Fix GET agents API to return agent specific chat model
There had been a regression that made all agents display the default chat model instead of the actual chat model associated with the agent. This change resolves that issue by prioritizing agent specific chat model from DB (over user or server chat model).
This commit is contained in:
@@ -62,7 +62,7 @@ async def all_agents(
|
||||
for agent in agents:
|
||||
files = agent.fileobject_set.all()
|
||||
file_names = [file.file_name for file in files]
|
||||
agent_chat_model = await AgentAdapters.aget_agent_chat_model(default_agent, user)
|
||||
agent_chat_model = await AgentAdapters.aget_agent_chat_model(agent, user)
|
||||
agent_packet = {
|
||||
"slug": agent.slug,
|
||||
"name": agent.name,
|
||||
|
||||
Reference in New Issue
Block a user