[PR #13636] [MERGED] template: fix args-as-json rendering #14306

Closed
opened 2026-04-13 00:50:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13636
Author: @drifkin
Created: 1/7/2026
Status: Merged
Merged: 1/7/2026
Merged by: @drifkin

Base: mainHead: drifkin/args-template-fix


📝 Commits (1)

  • ffbc1b4 template: fix args-as-json rendering

📊 Changes

2 files changed (+186 additions, -8 deletions)

View changed files

📝 template/template.go (+30 -8)
📝 template/template_test.go (+156 -0)

📄 Description

In #13525, I accidentally broke templates' ability to automatically render tool call function arguments as JSON.

We do need these to be proper maps because we need templates to be able to call range, which can't be done on custom types.


🔄 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/13636 **Author:** [@drifkin](https://github.com/drifkin) **Created:** 1/7/2026 **Status:** ✅ Merged **Merged:** 1/7/2026 **Merged by:** [@drifkin](https://github.com/drifkin) **Base:** `main` ← **Head:** `drifkin/args-template-fix` --- ### 📝 Commits (1) - [`ffbc1b4`](https://github.com/ollama/ollama/commit/ffbc1b4513ce0ba347b969db61dc507142cecb92) template: fix args-as-json rendering ### 📊 Changes **2 files changed** (+186 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `template/template.go` (+30 -8) 📝 `template/template_test.go` (+156 -0) </details> ### 📄 Description In #13525, I accidentally broke templates' ability to automatically render tool call function arguments as JSON. We do need these to be proper maps because we need templates to be able to call range, which can't be done on custom types. --- <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-13 00:50:30 -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#14306