mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-03 08:12:39 +00:00
fix: Replace assert with conditional check for event bus emission
- Replace assert hasattr(crewai_event_bus, 'emit') with proper conditional - Fixes S101 lint error in modified code section - Maintains same functionality with better error handling Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -782,7 +782,7 @@ class LLM(BaseLLM):
|
||||
current_tool_accumulator.function.arguments += (
|
||||
tool_call.function.arguments
|
||||
)
|
||||
assert hasattr(crewai_event_bus, "emit")
|
||||
if hasattr(crewai_event_bus, "emit"):
|
||||
# Convert ChatCompletionDeltaToolCall to ToolCall format
|
||||
from crewai.events.types.llm_events import ToolCall, FunctionCall
|
||||
converted_tool_call = ToolCall(
|
||||
|
||||
Reference in New Issue
Block a user