mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-24 15:48:23 +00:00
Fix CI failures: remove unused imports and add streaming parameters to agent adapters and test mocks
Co-Authored-By: João <joao@crewai.com>
This commit is contained in:
@@ -211,7 +211,6 @@ def test_llm_stream_chunk_to_crew_stream_chunk():
|
||||
|
||||
llm_event = LLMStreamChunkEvent(chunk="test chunk")
|
||||
|
||||
from crewai.utilities.events.crewai_event_bus import crewai_event_bus
|
||||
crewai_event_bus.emit(mock_source, llm_event)
|
||||
|
||||
assert len(received_crew_chunks) == 1
|
||||
@@ -230,6 +229,7 @@ def test_multiple_agents_streaming():
|
||||
with patch('crewai.llm.LLM') as mock_llm_class:
|
||||
mock_llm = Mock()
|
||||
mock_llm.call.return_value = "Agent response"
|
||||
mock_llm.supports_stop_words = True
|
||||
mock_llm_class.return_value = mock_llm
|
||||
|
||||
agent1 = Agent(
|
||||
|
||||
@@ -119,7 +119,7 @@ def test_guardrail_error_in_context():
|
||||
# Mock execute_task to succeed on second attempt
|
||||
first_call = True
|
||||
|
||||
def execute_task(task, context, tools):
|
||||
def execute_task(task, context, tools, stream=False, stream_callback=None):
|
||||
nonlocal first_call
|
||||
if first_call:
|
||||
first_call = False
|
||||
|
||||
Reference in New Issue
Block a user