mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-14 12:16:20 +00:00
feat: continuation messages
This commit is contained in:
1 parent
772860b667
commit
d609efca49
12 files changed
+1373
-38
No files matched your search
@@ -176,6 +176,8 @@ class TestLLMHandlerTokenTracking:
|
||||
# Create mock agent that hits limit on second tool
|
||||
mock_agent = Mock()
|
||||
mock_agent.context_limit_reached = False
|
||||
mock_agent.llm.__class__.__name__ = "MockLLM"
|
||||
mock_agent.tool_executor.check_pause = Mock(return_value=None)
|
||||
|
||||
call_count = [0]
|
||||
|
||||
@@ -235,6 +237,8 @@ class TestLLMHandlerTokenTracking:
|
||||
mock_agent = Mock()
|
||||
mock_agent.context_limit_reached = False
|
||||
mock_agent._check_context_limit = Mock(return_value=False)
|
||||
mock_agent.llm.__class__.__name__ = "MockLLM"
|
||||
mock_agent.tool_executor.check_pause = Mock(return_value=None)
|
||||
mock_agent._execute_tool_action = Mock(
|
||||
return_value=iter([{"type": "tool_call", "data": {}}])
|
||||
)
|
||||
@@ -300,7 +304,7 @@ class TestLLMHandlerTokenTracking:
|
||||
|
||||
def tool_handler_gen(*args):
|
||||
yield {"type": "tool", "data": {}}
|
||||
return []
|
||||
return [], None
|
||||
|
||||
# Mock handle_tool_calls to return messages and set flag
|
||||
with patch.object(
|
||||
|
||||
Reference in new issue
Block a user