[PR #15823] [CLOSED] fix: ollama tool call #39581

Closed
opened 2026-04-25 12:07:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/15823
Author: @EntropyYue
Created: 7/17/2025
Status: Closed

Base: devHead: fix/ollama-tool-call


📝 Commits (2)

📊 Changes

1 file changed (+5 additions, -6 deletions)

View changed files

📝 backend/open_webui/utils/response.py (+5 -6)

📄 Description

Changelog Entry

Description

Fixed the issue with multiple tool calls in Ollama. The index for Ollama's tool calls is located inside the function key. When using multiple tools, the code was unable to retrieve the correct index, instead using a default value of 0 for all tools, which led to errors. Previously, the code worked correctly when only a single tool was called because there was only one required index.
fix: #15546
fix: #15350

Fixed

  • Fixed the issue with multiple tool calls in Ollama

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/15823 **Author:** [@EntropyYue](https://github.com/EntropyYue) **Created:** 7/17/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/ollama-tool-call` --- ### 📝 Commits (2) - [`c56fc4e`](https://github.com/open-webui/open-webui/commit/c56fc4ebcc2733d672cea961d27225262fa0b4e0) fix: ollama tool call - [`ec00448`](https://github.com/open-webui/open-webui/commit/ec00448464de57b545d91691d20c58f6d1ea472f) chore: format ### 📊 Changes **1 file changed** (+5 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/utils/response.py` (+5 -6) </details> ### 📄 Description # Changelog Entry ### Description Fixed the issue with multiple tool calls in Ollama. The `index` for Ollama's tool calls is located inside the `function` key. When using multiple tools, the code was unable to retrieve the correct `index`, instead using a default value of 0 for all tools, which led to errors. Previously, the code worked correctly when only a single tool was called because there was only one required `index`. fix: #15546 fix: #15350 ### Fixed - Fixed the issue with multiple tool calls in Ollama ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 12:07:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#39581