[PR #14599] Optimization #25280

Open
opened 2026-04-19 18:07:19 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14599
Author: @Bubuworks
Created: 3/3/2026
Status: 🔄 Open

Base: mainHead: patch-1


📝 Commits (1)

📊 Changes

1 file changed (+14 additions, -42 deletions)

View changed files

📝 thinking/parser.go (+14 -42)

📄 Description

trimmed is only calculated once and reused in the function, reducing calls to TrimLeftFunc.

Instead of using strings.Split, the string is directly sliced using strings.Index.

Optimized state transition to handle state transitions more efficiently.


🔄 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/14599 **Author:** [@Bubuworks](https://github.com/Bubuworks) **Created:** 3/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`0d508d3`](https://github.com/ollama/ollama/commit/0d508d32252f51f73862be861f1b5f5ec77b8619) Optimization ### 📊 Changes **1 file changed** (+14 additions, -42 deletions) <details> <summary>View changed files</summary> 📝 `thinking/parser.go` (+14 -42) </details> ### 📄 Description trimmed is only calculated once and reused in the function, reducing calls to TrimLeftFunc. Instead of using strings.Split, the string is directly sliced using strings.Index. Optimized state transition to handle state transitions more efficiently. --- <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 18:07:20 -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#25280