Skip to content

Conversation

@praison-ai-bot
Copy link

Fixes #854

Summary of changes:

  • Modified to correctly handle conversation history for Ollama models during sequential tool calls.
  • Ensured that the full message history is preserved in the follow-up prompt to the model after a tool execution, preventing the model from losing context and repeating the same tool call.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 12, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Join our Discord community for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@MervinPraison
Copy link
Owner

@claude review this pull request and do a detailed analysis and fix this if the existing code doesn't have the solution implemented. Making sure it has backward compatibility, no existing features removed. After making those changes, again review the applied changes. Use @web to search if you dont know any information or to find the latest documentation or to find the latest version. Run the code if you think you need to run it to test it. Minimal code change to start with if required any changes.

@claude
Copy link
Contributor

claude bot commented Jul 12, 2025

Claude encountered an error —— View job


I'll analyze this and get back to you.

@MervinPraison
Copy link
Owner

@gemini read the code and provide a review if the implementation is correct

@praison-ai-bot
Copy link
Author

📋 Review Summary

This pull request provides a crucial fix for a bug where Ollama models would fail during sequential tool calls due to context loss. The change correctly preserves the full conversation history, ensuring the model can proceed with the sequence as expected.

🔍 General Feedback

The proposed solution is clean, direct, and effectively resolves the identified issue. By concatenating the existing message history with the new tool-related messages, the context is maintained for subsequent model calls. The change is consistently applied to both the synchronous and asynchronous functions, ensuring uniform behavior.

🎯 Specific Feedback

No specific issues identified in this review. The implementation is correct and follows best practices.

✅ Highlights

  • Correctness: The fix directly addresses the root cause of the problem described in issue Ollama sequential still failing #854.
  • Clarity: The added code is easy to understand, and the accompanying comment clearly explains the purpose of the change.
  • Consistency: The correction has been applied to both get_response and get_response_async methods, ensuring the fix works in all execution modes.

Review completed by Gemini CLI

@MervinPraison
Copy link
Owner

@gemini-cli review

@MervinPraison MervinPraison merged commit 89c1415 into main Jul 12, 2025
9 of 10 checks passed
@praison-ai-bot
Copy link
Author

📋 Review Summary

This pull request addresses a bug in the sequential tool calling feature for Ollama models, where the conversation history was not being correctly preserved. The fix ensures the full message history is passed to the model in subsequent calls, which effectively resolves the context loss issue.

🔍 General Feedback

The proposed change is well-implemented, clear, and directly solves the reported problem. By concatenating the existing history with the new messages, the fix is both simple and effective. It's good to see that the solution was consistently applied to both the synchronous (get_response) and asynchronous (get_response_async) methods, ensuring uniform behavior.

🎯 Specific Feedback

No specific issues identified in this review.

✅ Highlights

  • Correctness: The fix correctly identifies and resolves the root cause of the bug by preserving the full conversation history.
  • Consistency: The change is properly applied to both synchronous and asynchronous code paths, preventing future discrepancies.
  • Clarity: The added code and comments are clear and make the intention easy to understand.

Review completed by Gemini CLI

@MervinPraison
Copy link
Owner

❯ python ollama-sequential.py
00:05:17 - LiteLLM:DEBUG: litellm_logging.py:141 - [Non-Blocking] Unable to import GenericAPILogger - LiteLLM Enterprise Feature - No module named 'litellm.proxy.enterprise'
[00:05:17] DEBUG    [00:05:17] litellm_logging.py:141 DEBUG [Non-Blocking]   litellm_logging.py:141
                    Unable to import GenericAPILogger - LiteLLM Enterprise                         
                    Feature - No module named 'litellm.proxy.enterprise'                           
[00:05:18] DEBUG    [00:05:18] telemetry.py:81 DEBUG Telemetry enabled with session telemetry.py:81
                    b826627d8501e209                                                               
           DEBUG    [00:05:18] llm.py:141 DEBUG LLM instance initialized with: {         llm.py:141
                      "model": "ollama/llama3.2",                                                  
                      "timeout": null,                                                             
                      "temperature": null,                                                         
                      "top_p": null,                                                               
                      "n": null,                                                                   
                      "max_tokens": null,                                                          
                      "presence_penalty": null,                                                    
                      "frequency_penalty": null,                                                   
                      "logit_bias": null,                                                          
                      "response_format": null,                                                     
                      "seed": null,                                                                
                      "logprobs": null,                                                            
                      "top_logprobs": null,                                                        
                      "api_version": null,                                                         
                      "stop_phrases": null,                                                        
                      "api_key": null,                                                             
                      "base_url": null,                                                            
                      "verbose": true,                                                             
                      "markdown": true,                                                            
                      "self_reflect": false,                                                       
                      "max_reflect": 3,                                                            
                      "min_reflect": 1,                                                            
                      "reasoning_steps": false,                                                    
                      "extra_settings": {}                                                         
                    }                                                                              
           DEBUG    [00:05:18] agent.py:416 DEBUG Tools passed to Agent with custom    agent.py:416
                    LLM: [<function get_stock_price at 0x1058a8ae0>, <function                     
                    multiply at 0x105a356c0>]                                                      
           DEBUG    [00:05:18] agent.py:1160 DEBUG Agent.chat parameters: {           agent.py:1160
                      "prompt": "what is the stock price of Google? multiply the                   
                    Google stock price with 2",                                                    
                      "temperature": 0.2,                                                          
                      "tools": null,                                                               
                      "output_json": null,                                                         
                      "output_pydantic": null,                                                     
                      "reasoning_steps": false,                                                    
                      "agent_name": "Agent",                                                       
                      "agent_role": "Assistant",                                                   
                      "agent_goal": "You are a helpful assistant. You can use the                  
                    tools provided to you to help the user."                                       
                    }                                                                              
           INFO     [00:05:18] llm.py:593 INFO Getting response from ollama/llama3.2     llm.py:593
           DEBUG    [00:05:18] llm.py:147 DEBUG LLM instance configuration: {            llm.py:147
                      "model": "ollama/llama3.2",                                                  
                      "timeout": null,                                                             
                      "temperature": null,                                                         
                      "top_p": null,                                                               
                      "n": null,                                                                   
                      "max_tokens": null,                                                          
                      "presence_penalty": null,                                                    
                      "frequency_penalty": null,                                                   
                      "logit_bias": null,                                                          
                      "response_format": null,                                                     
                      "seed": null,                                                                
                      "logprobs": null,                                                            
                      "top_logprobs": null,                                                        
                      "api_version": null,                                                         
                      "stop_phrases": null,                                                        
                      "api_key": null,                                                             
                      "base_url": null,                                                            
                      "verbose": true,                                                             
                      "markdown": true,                                                            
                      "self_reflect": false,                                                       
                      "max_reflect": 3,                                                            
                      "min_reflect": 1,                                                            
                      "reasoning_steps": false                                                     
                    }                                                                              
           DEBUG    [00:05:18] llm.py:143 DEBUG get_response parameters: {               llm.py:143
                      "prompt": "what is the stock price of Google? multiply the Google            
                    stock price with 2",                                                           
                      "system_prompt": "You are a helpful assistant. You can use the               
                    tools provided to you to help the user.\n\nYour Role: Ass...",                 
                      "chat_history": "[1 messages]",                                              
                      "temperature": 0.2,                                                          
                      "tools": [                                                                   
                        "get_stock_price",                                                         
                        "multiply"                                                                 
                      ],                                                                           
                      "output_json": null,                                                         
                      "output_pydantic": null,                                                     
                      "verbose": true,                                                             
                      "markdown": true,                                                            
                      "self_reflect": false,                                                       
                      "max_reflect": 3,                                                            
                      "min_reflect": 1,                                                            
                      "agent_name": "Agent",                                                       
                      "agent_role": "Assistant",                                                   
                      "agent_tools": [                                                             
                        "get_stock_price",                                                         
                        "multiply"                                                                 
                      ],                                                                           
                      "kwargs": "{'reasoning_steps': False}"                                       
                    }                                                                              
           DEBUG    [00:05:18] llm.py:2184 DEBUG Generating tool definition for         llm.py:2184
                    callable: get_stock_price                                                      
           DEBUG    [00:05:18] llm.py:2229 DEBUG Function signature: (company_name:     llm.py:2229
                    str) -> str                                                                    
           DEBUG    [00:05:18] llm.py:2248 DEBUG Function docstring: Get the stock      llm.py:2248
                    price of a company                                                             
                                                                                                   
                    Args:                                                                          
                        company_name (str): The name of the company                                
                                                                                                   
                    Returns:                                                                       
                        str: The stock price of the company                                        
           DEBUG    [00:05:18] llm.py:2254 DEBUG Param section split: ['Get the stock   llm.py:2254
                    price of a company', 'company_name (str): The name of the company\n            
                    \nReturns:\n    str: The stock price of the company']                          
           DEBUG    [00:05:18] llm.py:2263 DEBUG Parameter descriptions: {'company_name llm.py:2263
                    (str)': 'The name of the company', 'Returns': '', 'str': 'The stock            
                    price of the company'}                                                         
           DEBUG    [00:05:18] llm.py:2287 DEBUG Generated parameters: {'type':         llm.py:2287
                    'object', 'properties': {'company_name': {'type': 'string',                    
                    'description': 'Parameter description not available'}}, 'required':            
                    ['company_name']}                                                              
           DEBUG    [00:05:18] llm.py:2296 DEBUG Generated tool definition: {'type':    llm.py:2296
                    'function', 'function': {'name': 'get_stock_price', 'description':             
                    'Get the stock price of a company', 'parameters': {'type':                     
                    'object', 'properties': {'company_name': {'type': 'string',                    
                    'description': 'Parameter description not available'}}, 'required':            
                    ['company_name']}}}                                                            
           DEBUG    [00:05:18] llm.py:2184 DEBUG Generating tool definition for         llm.py:2184
                    callable: multiply                                                             
           DEBUG    [00:05:18] llm.py:2229 DEBUG Function signature: (a: int, b: int)   llm.py:2229
                    -> int                                                                         
           DEBUG    [00:05:18] llm.py:2248 DEBUG Function docstring: Multiply two       llm.py:2248
                    numbers                                                                        
           DEBUG    [00:05:18] llm.py:2254 DEBUG Param section split: ['Multiply two    llm.py:2254
                    numbers']                                                                      
           DEBUG    [00:05:18] llm.py:2263 DEBUG Parameter descriptions: {}             llm.py:2263
           DEBUG    [00:05:18] llm.py:2287 DEBUG Generated parameters: {'type':         llm.py:2287
                    'object', 'properties': {'a': {'type': 'integer', 'description':               
                    'Parameter description not available'}, 'b': {'type': 'integer',               
                    'description': 'Parameter description not available'}}, 'required':            
                    ['a', 'b']}                                                                    
           DEBUG    [00:05:18] llm.py:2296 DEBUG Generated tool definition: {'type':    llm.py:2296
                    'function', 'function': {'name': 'multiply', 'description':                    
                    'Multiply two numbers', 'parameters': {'type': 'object',                       
                    'properties': {'a': {'type': 'integer', 'description': 'Parameter              
                    description not available'}, 'b': {'type': 'integer',                          
                    'description': 'Parameter description not available'}}, 'required':            
                    ['a', 'b']}}}                                                                  
╭─ Agent Info ────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                 │
│  👤 Agent: Agent                                                                                │
│  Role: Assistant                                                                                │
│  Tools: get_stock_price, multiply                                                               │
│                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭────────────────────────────────────────── Instruction ──────────────────────────────────────────╮
│ Agent Agent is processing prompt: what is the stock price of Google? multiply the Google stock  │
│ price with 2                                                                                    │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
/Users/praison/miniconda3/envs/praisonai-package/lib/python3.11/site-packages/httpx/_models.py:408: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
  headers, stream = encode_request(
Response generated in 0.5s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:18] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:18] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:18] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:18] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:18] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:18] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:18] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:18] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.4s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[00:05:19] DEBUG    [00:05:19] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:19] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:19] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:19] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:19] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:19] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:19] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:19] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:19] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:19] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:19] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:19] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:19] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:19] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:19] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:19] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:19] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:19] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:19] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[00:05:20] DEBUG    [00:05:20] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:20] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:20] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:20] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:20] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:20] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:20] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:20] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:20] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:20] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:20] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:20] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:20] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:20] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:20] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:20] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:20] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:20] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:20] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[00:05:21] DEBUG    [00:05:21] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:21] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:21] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:21] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:21] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:21] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:21] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:21] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:21] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:21] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:21] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:21] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 0.3s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:21] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [00:05:21] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [00:05:21] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [00:05:21] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [00:05:21] llm.py:837 DEBUG [TOOL_EXEC_DEBUG] Display message with   llm.py:837
                    result: Agent Agent called function 'get_stock_price' with                     
                    arguments: {'company_name': 'Google'}                                          
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] llm.py:842 DEBUG [TOOL_EXEC_DEBUG] About to display tool  llm.py:842
                    call with message: Agent Agent called function 'get_stock_price'               
                    with arguments: {'company_name': 'Google'}                                     
                    Function returned: The stock price of Google is 100                            
           DEBUG    [00:05:21] main.py:175 DEBUG display_tool_call called with message: main.py:175
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
           DEBUG    [00:05:21] main.py:182 DEBUG Cleaned message in display_tool_call:  main.py:182
                    "Agent Agent called function 'get_stock_price' with arguments:                 
                    {'company_name': 'Google'}\nFunction returned: The stock price of              
                    Google is 100"                                                                 
╭─────────────────────────────────────── Tool Call ────────────────────────────────────────╮
│ Agent Agent called function 'get_stock_price' with arguments: {'company_name': 'Google'} │
│ Function returned: The stock price of Google is 100                                      │
╰──────────────────────────────────────────────────────────────────────────────────────────╯
Response generated in 3.6s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:21] main.py:86 DEBUG Empty content received in                main.py:86
                    _clean_display_content: ''                                                     
Response generated in 3.6s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [00:05:21] agent.py:1247 DEBUG Agent.chat completed in 3.64       agent.py:1247
                    seconds                                                                        
           DEBUG    [00:05:21] telemetry.py:121 DEBUG Agent execution tracked:     telemetry.py:121
                    success=True                                                                   
           DEBUG    [00:05:21] telemetry.py:121 DEBUG Agent execution tracked:     telemetry.py:121
                    success=True                                                                   

[00:05:22] DEBUG    [00:05:22] telemetry.py:209 DEBUG Telemetry flush: {'enabled': telemetry.py:209
                    True, 'session_id': 'b826627d8501e209', 'metrics':                             
                    {'agent_executions': 2, 'task_completions': 0, 'tool_calls':                   
                    10, 'errors': 0}, 'environment': {'python_version': '3.11.11',                 
                    'os_type': 'Darwin', 'framework_version': 'unknown'}}                        

@MervinPraison
Copy link
Owner

@gemini i get above error after implementing the changes you made

2 similar comments
@MervinPraison
Copy link
Owner

@gemini i get above error after implementing the changes you made

@MervinPraison
Copy link
Owner

@gemini i get above error after implementing the changes you made

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ollama sequential still failing

2 participants