[GH-ISSUE #8278] Ollama v0.5.4 not response with stream mode when submit tool option #5296

Closed
opened 2026-04-12 16:28:42 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @maminge on GitHub (Jan 1, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/8278

What is the issue?

Ollama v0.5.4 not response with stream mode when submit tool option
When the content of the reply is not tool_call, I hope to reply in stream mode.

Thanks lot for your efforts!!!


POST DATA to Ollama API: http://localhost:11434/api/chat


{
    "model": "Qwen2.5-Instruct-q4_1:14b",
    "messages": [
        {
            "role": "system",
            "content": "Determine which agent is best suited to handle the user's request, and transfer the conversation to that agent."
        },
        {
            "role": "user",
            "content": "hello"
        }
    ],
    "stream": true,
    "tools": [
        {
            "type": "function",
            "function": {
                "name": "transfer_to_sales",
                "description": "",
                "parameters": {
                    "type": "object",
                    "properties": {},
                    "required": []
                }
            }
        },
        {
            "type": "function",
            "function": {
                "name": "transfer_to_refunds",
                "description": "",
                "parameters": {
                    "type": "object",
                    "properties": {},
                    "required": []
                }
            }
        }
    ]
}

Ollama's Response (NOT STREAM MODE):


{
  "model": "Qwen2.5-Instruct-q4_1:14b",
  "created_at": "2025-01-01T03:24:28.802889952Z",
  "message": {
    "role": "assistant",
    "content": "Hello! How can I assist you today? If you're looking to make a purchase, request a refund, or have any other queries, please let me know so I can transfer you to the right agent."
  },
  "done_reason": "stop",
  "done": true,
  "total_duration": 1795719070,
  "load_duration": 11320172,
  "prompt_eval_count": 178,
  "prompt_eval_duration": 82000000,
  "eval_count": 43,
  "eval_duration": 1696000000
}

OS

Linux

GPU

Nvidia

CPU

Intel

Ollama version

0.5.4

Originally created by @maminge on GitHub (Jan 1, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/8278 ### What is the issue? Ollama v0.5.4 not response with stream mode when submit tool option When the content of the reply is not tool_call, I hope to reply in stream mode. # Thanks lot for your efforts!!! ------------------------------------------ ### POST DATA to Ollama API: http://localhost:11434/api/chat ------------------------------------------ ``` { "model": "Qwen2.5-Instruct-q4_1:14b", "messages": [ { "role": "system", "content": "Determine which agent is best suited to handle the user's request, and transfer the conversation to that agent." }, { "role": "user", "content": "hello" } ], "stream": true, "tools": [ { "type": "function", "function": { "name": "transfer_to_sales", "description": "", "parameters": { "type": "object", "properties": {}, "required": [] } } }, { "type": "function", "function": { "name": "transfer_to_refunds", "description": "", "parameters": { "type": "object", "properties": {}, "required": [] } } } ] } ``` ------------------------------------------ ### Ollama's Response (NOT STREAM MODE): ------------------------------------------ ``` { "model": "Qwen2.5-Instruct-q4_1:14b", "created_at": "2025-01-01T03:24:28.802889952Z", "message": { "role": "assistant", "content": "Hello! How can I assist you today? If you're looking to make a purchase, request a refund, or have any other queries, please let me know so I can transfer you to the right agent." }, "done_reason": "stop", "done": true, "total_duration": 1795719070, "load_duration": 11320172, "prompt_eval_count": 178, "prompt_eval_duration": 82000000, "eval_count": 43, "eval_duration": 1696000000 } ``` ### OS Linux ### GPU Nvidia ### CPU Intel ### Ollama version 0.5.4
GiteaMirror added the bug label 2026-04-12 16:28:42 -05:00
Author
Owner

@rick-github commented on GitHub (Jan 1, 2025):

https://github.com/ollama/ollama/issues/7886

<!-- gh-comment-id:2566840888 --> @rick-github commented on GitHub (Jan 1, 2025): https://github.com/ollama/ollama/issues/7886
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#5296