[PR #6115] [MERGED] Fix context in /api/generate grows too much (#5980). #12022

Closed
opened 2026-04-12 23:46:28 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/6115
Author: @slouffka
Created: 8/1/2024
Status: Merged
Merged: 8/1/2024
Merged by: @mxyng

Base: mainHead: fix-context


📝 Commits (5)

  • 6bc5c13 Fix extra context concatenation in generate handler (#5980).
  • 49a5483 Change the order of context and prompt.
  • b0c2165 Better types and naming closer to style.
  • 3b52105 Refactor code. Remove extra variable.
  • 8a9f946 Refactor and format code.

📊 Changes

1 file changed (+6 additions, -7 deletions)

View changed files

📝 server/routes.go (+6 -7)

📄 Description

This PR fixes Context in /api/generate response grows too big. #5980


🔄 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/6115 **Author:** [@slouffka](https://github.com/slouffka) **Created:** 8/1/2024 **Status:** ✅ Merged **Merged:** 8/1/2024 **Merged by:** [@mxyng](https://github.com/mxyng) **Base:** `main` ← **Head:** `fix-context` --- ### 📝 Commits (5) - [`6bc5c13`](https://github.com/ollama/ollama/commit/6bc5c137581cdd825627e7ec3da308843c94e162) Fix extra context concatenation in generate handler (#5980). - [`49a5483`](https://github.com/ollama/ollama/commit/49a54831397d1723af4fbcd4f0c5c68dadbc54d5) Change the order of context and prompt. - [`b0c2165`](https://github.com/ollama/ollama/commit/b0c216584c82b47fa91323468a2c58e79f96f0bb) Better types and naming closer to style. - [`3b52105`](https://github.com/ollama/ollama/commit/3b5210548e957c5011233ae0e114131413362188) Refactor code. Remove extra variable. - [`8a9f946`](https://github.com/ollama/ollama/commit/8a9f946ca76d04cfc964a3ffe5b919c0fb51915b) Refactor and format code. ### 📊 Changes **1 file changed** (+6 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `server/routes.go` (+6 -7) </details> ### 📄 Description This PR fixes [Context in /api/generate response grows too big. #5980 ](https://github.com/ollama/ollama/issues/5980) --- <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-12 23:46:28 -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#12022