Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
test(agent): provide history consolidator in response source test
chengyongrua478c96bde5c
diff --git a/tests/agent/test_response_source.py b/tests/agent/test_response_source.pyindex cef4fb474..b9f5af61c 100644--- a/tests/agent/test_response_source.py+++ b/tests/agent/test_response_source.py@@ -8,6 +8,7 @@ from unittest.mock import AsyncMock, MagicMockimport pytest+from agent.runner_helpers import failed_test_consolidatorfrom nanobot.agent.progress_hook import AgentProgressHookfrom nanobot.agent.runner import AgentRunner, AgentRunSpecfrom nanobot.agent.tools.registry import ToolRegistry@@ -341,6 +342,7 @@ async def test_runner_records_each_provider_when_streaming_times_out_and_recoverruntime=runtime, max_iterations=2, max_tool_result_chars=4096,session_key="websocket:chat", events=turn.events,hook=AgentProgressHook(turn.events, streaming=True),+ consolidate_history=failed_test_consolidator,))assert result.final_content == "Recovered answer"outgoing = [bus.outbound.get_nowait() for _ in range(bus.outbound.qsize())]