feat: add clsx dependency, enhance logging in agent logic, and improve agent logs component

This commit is contained in:
Siddhant Rai
2025-04-28 14:18:28 +05:30
parent 8289b02ab0
commit 4979e1ac9a
17 changed files with 254 additions and 121 deletions

View File

@@ -255,7 +255,7 @@ class BaseAgent(ABC):
model=self.gpt_model, messages=messages, tools=self.tools
)
if log_context:
data = build_stack_data(self.llm)
data = build_stack_data(self.llm, exclude_attributes=["client"])
log_context.stacks.append({"component": "llm", "data": data})
return resp
@@ -271,6 +271,6 @@ class BaseAgent(ABC):
self, resp, tools_dict, messages, attachments
)
if log_context:
data = build_stack_data(self.llm_handler)
data = build_stack_data(self.llm_handler, exclude_attributes=["tool_calls"])
log_context.stacks.append({"component": "llm_handler", "data": data})
return resp