Skip to content

Ollama sequential still failing #854

@MervinPraison

Description

@MervinPraison
❯ python ollama-sequential.py
23:29:55 - LiteLLM:DEBUG: litellm_logging.py:141 - [Non-Blocking] Unable to import GenericAPILogger - LiteLLM Enterprise Feature - No module named 'litellm.proxy.enterprise'
[23:29:55] DEBUG    [23:29:55] litellm_logging.py:141 DEBUG [Non-Blocking]   litellm_logging.py:141
                    Unable to import GenericAPILogger - LiteLLM Enterprise                         
                    Feature - No module named 'litellm.proxy.enterprise'                           
[23:29:56] DEBUG    [23:29:56] telemetry.py:81 DEBUG Telemetry enabled with session telemetry.py:81
                    409dc204e95e5fe1                                                               
           DEBUG    [23:29:56] 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    [23:29:56] agent.py:416 DEBUG Tools passed to Agent with custom    agent.py:416
                    LLM: [<function get_stock_price at 0x1053b0ae0>, <function                     
                    multiply at 0x10553d6c0>]                                                      
           DEBUG    [23:29:56] 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     [23:29:56] llm.py:593 INFO Getting response from ollama/llama3.2     llm.py:593
           DEBUG    [23:29:56] 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    [23:29:56] 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    [23:29:56] llm.py:2180 DEBUG Generating tool definition for         llm.py:2180
                    callable: get_stock_price                                                      
           DEBUG    [23:29:56] llm.py:2225 DEBUG Function signature: (company_name:     llm.py:2225
                    str) -> str                                                                    
           DEBUG    [23:29:56] llm.py:2244 DEBUG Function docstring: Get the stock      llm.py:2244
                    price of a company                                                             
                                                                                                   
                    Args:                                                                          
                        company_name (str): The name of the company                                
                                                                                                   
                    Returns:                                                                       
                        str: The stock price of the company                                        
           DEBUG    [23:29:56] llm.py:2250 DEBUG Param section split: ['Get the stock   llm.py:2250
                    price of a company', 'company_name (str): The name of the company\n            
                    \nReturns:\n    str: The stock price of the company']                          
           DEBUG    [23:29:56] llm.py:2259 DEBUG Parameter descriptions: {'company_name llm.py:2259
                    (str)': 'The name of the company', 'Returns': '', 'str': 'The stock            
                    price of the company'}                                                         
           DEBUG    [23:29:56] llm.py:2283 DEBUG Generated parameters: {'type':         llm.py:2283
                    'object', 'properties': {'company_name': {'type': 'string',                    
                    'description': 'Parameter description not available'}}, 'required':            
                    ['company_name']}                                                              
           DEBUG    [23:29:56] llm.py:2292 DEBUG Generated tool definition: {'type':    llm.py:2292
                    '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    [23:29:56] llm.py:2180 DEBUG Generating tool definition for         llm.py:2180
                    callable: multiply                                                             
           DEBUG    [23:29:56] llm.py:2225 DEBUG Function signature: (a: int, b: int)   llm.py:2225
                    -> int                                                                         
           DEBUG    [23:29:56] llm.py:2244 DEBUG Function docstring: Multiply two       llm.py:2244
                    numbers                                                                        
           DEBUG    [23:29:56] llm.py:2250 DEBUG Param section split: ['Multiply two    llm.py:2250
                    numbers']                                                                      
           DEBUG    [23:29:56] llm.py:2259 DEBUG Parameter descriptions: {}             llm.py:2259
           DEBUG    [23:29:56] llm.py:2283 DEBUG Generated parameters: {'type':         llm.py:2283
                    'object', 'properties': {'a': {'type': 'integer', 'description':               
                    'Parameter description not available'}, 'b': {'type': 'integer',               
                    'description': 'Parameter description not available'}}, 'required':            
                    ['a', 'b']}                                                                    
           DEBUG    [23:29:56] llm.py:2292 DEBUG Generated tool definition: {'type':    llm.py:2292
                    '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 18.1s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[23:30:14] DEBUG    [23:30:14] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:14] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:14] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:14] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:14] 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    [23:30:14] 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    [23:30:14] 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    [23:30:14] 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                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[23:30:15] DEBUG    [23:30:15] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:15] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:15] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:15] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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    [23:30:15] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:15] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:15] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:15] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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    [23:30:15] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:15] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:15] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:15] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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    [23:30:15] 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                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[23:30:16] DEBUG    [23:30:16] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:16] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:16] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:16] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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    [23:30:16] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:16] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:16] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:16] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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    [23:30:16] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:16] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:16] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:16] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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    [23:30:16] 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                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
[23:30:17] DEBUG    [23:30:17] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:17] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:17] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:17] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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    [23:30:17] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:17] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:17] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:17] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [23:30:17] llm.py:828 DEBUG [TOOL_EXEC_DEBUG] About to execute tool  llm.py:828
                    get_stock_price with args: {'company_name': 'Google'}                          
           DEBUG    [23:30:17] agent.py:946 DEBUG Agent executing tool get_stock_price agent.py:946
                    with arguments: {'company_name': 'Google'}                                     
           DEBUG    [23:30:17] telemetry.py:152 DEBUG Tool usage tracked:          telemetry.py:152
                    get_stock_price, success=True                                                  
           DEBUG    [23:30:17] llm.py:830 DEBUG [TOOL_EXEC_DEBUG] Tool execution result: llm.py:830
                    The stock price of Google is 100                                               
           DEBUG    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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    [23:30:17] 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 21.2s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
│ None                                                                                            │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [23:30:17] main.py:86 DEBUG Empty content received in                main.py:86
                    _clean_display_content: ''                                                     
Response generated in 21.2s
╭───────────────────────────────────────────── Task ──────────────────────────────────────────────╮
│ what is the stock price of Google? multiply the Google stock price with 2                       │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────── Response ────────────────────────────────────────────╮
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
           DEBUG    [23:30:17] agent.py:1247 DEBUG Agent.chat completed in 21.21      agent.py:1247
                    seconds                                                                        
           DEBUG    [23:30:17] telemetry.py:121 DEBUG Agent execution tracked:     telemetry.py:121
                    success=True                                                                   
           DEBUG    [23:30:17] telemetry.py:121 DEBUG Agent execution tracked:     telemetry.py:121
                    success=True                                                                   

[23:30:18] DEBUG    [23:30:18] telemetry.py:209 DEBUG Telemetry flush: {'enabled': telemetry.py:209
                    True, 'session_id': '409dc204e95e5fe1', 'metrics':                             
                    {'agent_executions': 2, 'task_completions': 0, 'tool_calls':                   
                    10, 'errors': 0}, 'environment': {'python_version': '3.11.11',                 
                    'os_type': 'Darwin', 'framework_version': 'unknown'}}                          
❯ 
from praisonaiagents import Agent

def get_stock_price(company_name: str) -> str:
    """
    Get the stock price of a company
    
    Args:
        company_name (str): The name of the company
        
    Returns:
        str: The stock price of the company
    """
    return f"The stock price of {company_name} is 100"

def multiply(a: int, b: int) -> int:
    """
    Multiply two numbers
    """
    return a * b



agent = Agent(
    instructions="You are a helpful assistant. You can use the tools provided to you to help the user.",
    llm="ollama/llama3.2",
    tools=[get_stock_price, multiply]
)

result = agent.start("what is the stock price of Google? multiply the Google stock price with 2")
print(result)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions