Fixing tests

This commit is contained in:
Cyber MacGeddon 2025-11-26 19:12:36 +00:00
parent 779de8c773
commit d7dc3d7767

View file

@ -36,15 +36,15 @@ Args: {
}""" }"""
if streaming and chunk_callback: if streaming and chunk_callback:
# Simulate streaming response with token-level chunks # Send line-by-line chunks to test streaming while avoiding parser state issues
# Real LLMs stream token by token, not line by line # The StreamingReActParser expects delimiters to be complete, so we send
# each line as a complete chunk
chunks = [ chunks = [
"Thought", ": ", "I", " need", " to", " search", " for", "Thought: I need to search for information about machine learning.\n",
" information", " about", " machine", " learning", ".\n", "Action: knowledge_query\n",
"Action", ": ", "knowledge", "_query", "\n", "Args: {\n",
"Args", ": ", "{", "\n", ' "question": "What is machine learning?"\n',
' "', "question", '": "', "What", " is", " machine", "}"
" learning", '?"', "\n", "}"
] ]
for chunk in chunks: for chunk in chunks: