fix: revert to kickoff (stream not available on Agent)
This commit is contained in:
@@ -133,13 +133,11 @@ class ConversationalAgent:
|
|||||||
Returns:
|
Returns:
|
||||||
Dict with 'response' (the assistant's reply), 'thinking' (reasoning), and 'strategy_updated' (bool)
|
Dict with 'response' (the assistant's reply), 'thinking' (reasoning), and 'strategy_updated' (bool)
|
||||||
"""
|
"""
|
||||||
# Execute agent using stream to capture both thinking and output
|
# Execute agent using kickoff
|
||||||
try:
|
try:
|
||||||
# Use stream instead of kickoff to get thinking content
|
result = self.agent.kickoff(user_message)
|
||||||
result = self.agent.stream(user_message)
|
|
||||||
|
|
||||||
# In stream mode, result contains both output and thinking
|
# Try to extract thinking from result if available
|
||||||
# Extract thinking from the result if available
|
|
||||||
thinking = None
|
thinking = None
|
||||||
if hasattr(result, 'thinking') and result.thinking:
|
if hasattr(result, 'thinking') and result.thinking:
|
||||||
thinking = result.thinking
|
thinking = result.thinking
|
||||||
|
|||||||
Reference in New Issue
Block a user