[PR #10917] [MERGED] tools: resiliency upgrade to name and arg extraction from template #23937

Closed
opened 2026-04-19 17:17:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/10917
Author: @ParthSareen
Created: 5/30/2025
Status: Merged
Merged: 5/30/2025
Merged by: @ParthSareen

Base: mainHead: parth/tools-fix-json-args-template


📝 Commits (1)

  • ea0ce4b tools: resiliency upgrade to name and arg extraction from template

📊 Changes

2 files changed (+97 additions, -69 deletions)

View changed files

📝 tools/tools_utils.go (+15 -20)
📝 tools/tools_utils_test.go (+82 -49)

📄 Description

Closes: https://github.com/ollama/ollama/issues/10897

Doesn't fully solve the issue as an extra token gets printed out but at least gets it to working state.

<tool_call>

Calling function: get_temperature
Arguments:
{'city': 'Tokyo'}
Function output: 30

Update:

  • strip out the <tool_call> stuff when in FC

🔄 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/ollama/ollama/pull/10917 **Author:** [@ParthSareen](https://github.com/ParthSareen) **Created:** 5/30/2025 **Status:** ✅ Merged **Merged:** 5/30/2025 **Merged by:** [@ParthSareen](https://github.com/ParthSareen) **Base:** `main` ← **Head:** `parth/tools-fix-json-args-template` --- ### 📝 Commits (1) - [`ea0ce4b`](https://github.com/ollama/ollama/commit/ea0ce4bcf9c214755a0fffc23225bf7432302e47) tools: resiliency upgrade to name and arg extraction from template ### 📊 Changes **2 files changed** (+97 additions, -69 deletions) <details> <summary>View changed files</summary> 📝 `tools/tools_utils.go` (+15 -20) 📝 `tools/tools_utils_test.go` (+82 -49) </details> ### 📄 Description Closes: https://github.com/ollama/ollama/issues/10897 Doesn't fully solve the issue as an extra token gets printed out but at least gets it to working state. ```Prompt: What is the temperature in Tokyo? <tool_call> Calling function: get_temperature Arguments: {'city': 'Tokyo'} Function output: 30 ``` Update: - [ ] strip out the <tool_call> stuff when in FC --- <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-19 17:17:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#23937