[PR #14009] optimize: reuse json encoder in completion loop #40342

Open
opened 2026-04-23 01:15:39 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14009
Author: @grwang91
Created: 2/1/2026
Status: 🔄 Open

Base: mainHead: optimize/json-encoder-creation


📝 Commits (1)

  • dfbb762 reuse json encoder in completion loop

📊 Changes

2 files changed (+6 additions, -4 deletions)

View changed files

📝 runner/llamarunner/runner.go (+3 -2)
📝 runner/ollamarunner/runner.go (+3 -2)

📄 Description

This PR optimizes json encoder creation in completion loop by reusing it.

Fixes #14008


🔄 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/14009 **Author:** [@grwang91](https://github.com/grwang91) **Created:** 2/1/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `optimize/json-encoder-creation` --- ### 📝 Commits (1) - [`dfbb762`](https://github.com/ollama/ollama/commit/dfbb762227fd868f24949e02e576dc55f8b95938) reuse json encoder in completion loop ### 📊 Changes **2 files changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `runner/llamarunner/runner.go` (+3 -2) 📝 `runner/ollamarunner/runner.go` (+3 -2) </details> ### 📄 Description This PR optimizes json encoder creation in completion loop by reusing it. Fixes #14008 --- <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-23 01:15:39 -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#40342