mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 16:14:10 +00:00
Fall back to model_id for the logged model
Agents store their model only in model_id, so neither log_activity nor agent_log_context bound a model key. start_agent_span already reads it.
This commit is contained in:
1 parent
9df90ab9df
commit
cf9a5e9cb8
2 files changed
+6
-1
No files matched your search
+5
-1
@@ -97,7 +97,11 @@ def _agent_log_keys(agent: Any, data: Optional[Dict] = None) -> Dict[str, Any]:
|
||||
"agent_id": getattr(agent, "agent_id", None),
|
||||
"conversation_id": getattr(agent, "conversation_id", None),
|
||||
"endpoint": data.get("endpoint", ""),
|
||||
"model": getattr(agent, "gpt_model", None) or getattr(agent, "model", None),
|
||||
"model": (
|
||||
getattr(agent, "gpt_model", None)
|
||||
or getattr(agent, "model", None)
|
||||
or getattr(agent, "model_id", None)
|
||||
),
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user