[PR #12582] [MERGED] Reapply "add truncate and shift parameters #12617

Closed
opened 2025-11-12 16:40:56 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/12582
Author: @jmorganca
Created: 10/11/2025
Status: Merged
Merged: 10/11/2025
Merged by: @jmorganca

Base: mainHead: jmorganca/truncate-2


📝 Commits (2)

📊 Changes

8 files changed (+298 additions, -57 deletions)

View changed files

📝 api/types.go (+16 -0)
📝 llm/server.go (+4 -2)
📝 runner/llamarunner/runner.go (+22 -0)
📝 runner/ollamarunner/runner.go (+25 -0)
📝 server/prompt.go (+2 -2)
📝 server/prompt_test.go (+64 -38)
📝 server/routes.go (+64 -15)
📝 server/routes_generate_test.go (+101 -0)

📄 Description

This re-introduces the truncate and shift parameters. This PR was previously reverted due to changing error semantics. This time it should properly set the http status codes for errors that occur before streaming begins.


🔄 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/12582 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 10/11/2025 **Status:** ✅ Merged **Merged:** 10/11/2025 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/truncate-2` --- ### 📝 Commits (2) - [`68f3550`](https://github.com/ollama/ollama/commit/68f35506b371475c3a977655ffac67038c0b797c) Reapply "add truncate and shift parameters (#12519)" (#12545) - [`8bc72a7`](https://github.com/ollama/ollama/commit/8bc72a7a0be5fb168a4800fc78aa0bcc6be21d5a) dont fill Status field in api.StatusError ### 📊 Changes **8 files changed** (+298 additions, -57 deletions) <details> <summary>View changed files</summary> 📝 `api/types.go` (+16 -0) 📝 `llm/server.go` (+4 -2) 📝 `runner/llamarunner/runner.go` (+22 -0) 📝 `runner/ollamarunner/runner.go` (+25 -0) 📝 `server/prompt.go` (+2 -2) 📝 `server/prompt_test.go` (+64 -38) 📝 `server/routes.go` (+64 -15) 📝 `server/routes_generate_test.go` (+101 -0) </details> ### 📄 Description This re-introduces the `truncate` and `shift` parameters. This PR was previously reverted due to changing error semantics. This time it should properly set the http status codes for errors that occur before streaming begins. --- <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 2025-11-12 16:40:56 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama-ollama#12617
No description provided.