mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-13 18:18:29 +00:00
Fix LiteAgent tool calling in LLMCallStartedEvent
- Fix hardcoded tools=None in LLMCallStartedEvent emission - Convert self._parsed_tools to proper dict format for event - Add comprehensive tests for tool calling functionality - Add reproduction test for GitHub issue #3302 Fixes #3302 Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -525,7 +525,16 @@ class LiteAgent(FlowTrackable, BaseModel):
|
||||
self,
|
||||
event=LLMCallStartedEvent(
|
||||
messages=self._messages,
|
||||
tools=None,
|
||||
tools=[
|
||||
{
|
||||
"name": tool.name,
|
||||
"description": tool.description,
|
||||
"args": tool.args,
|
||||
}
|
||||
for tool in self._parsed_tools
|
||||
]
|
||||
if self._parsed_tools
|
||||
else None,
|
||||
callbacks=self._callbacks,
|
||||
from_agent=self,
|
||||
model=model,
|
||||
|
||||
Reference in New Issue
Block a user