[GH-ISSUE #10368] ragflow get ollama api warn:truncating input prompt" limit=2048 #68869

Closed
opened 2026-05-04 15:26:03 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @yiminghub2024 on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/10368

What is the issue?

time=2025-04-22T11:21:46.411Z level=INFO source=server.go:619 msg="llama runner started in 0.25 seconds"
[GIN] 2025/04/22 - 11:21:46 | 200 | 444.455595ms | 10.130.41.81 | POST "/api/embeddings"
time=2025-04-22T11:21:47.546Z level=WARN source=runner.go:131 msg="truncating input prompt" limit=2048 prompt=5065 keep=5 new=2048

Relevant log output

time=2025-04-22T11:21:46.411Z level=INFO source=server.go:619 msg="llama runner started in 0.25 seconds"
[GIN] 2025/04/22 - 11:21:46 | 200 |  444.455595ms |    10.130.41.81 | POST     "/api/embeddings"
time=2025-04-22T11:21:47.546Z level=WARN source=runner.go:131 msg="truncating input prompt" limit=2048 prompt=5065 keep=5 new=2048

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

Originally created by @yiminghub2024 on GitHub (Apr 22, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/10368 ### What is the issue? time=2025-04-22T11:21:46.411Z level=INFO source=server.go:619 msg="llama runner started in 0.25 seconds" [GIN] 2025/04/22 - 11:21:46 | 200 | 444.455595ms | 10.130.41.81 | POST "/api/embeddings" time=2025-04-22T11:21:47.546Z level=WARN source=runner.go:131 msg="truncating input prompt" limit=2048 prompt=5065 keep=5 new=2048 ### Relevant log output ```shell time=2025-04-22T11:21:46.411Z level=INFO source=server.go:619 msg="llama runner started in 0.25 seconds" [GIN] 2025/04/22 - 11:21:46 | 200 | 444.455595ms | 10.130.41.81 | POST "/api/embeddings" time=2025-04-22T11:21:47.546Z level=WARN source=runner.go:131 msg="truncating input prompt" limit=2048 prompt=5065 keep=5 new=2048 ``` ### OS _No response_ ### GPU _No response_ ### CPU _No response_ ### Ollama version _No response_
GiteaMirror added the bug label 2026-05-04 15:26:03 -05:00
Author
Owner
<!-- gh-comment-id:2821025519 --> @rick-github commented on GitHub (Apr 22, 2025): https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size
Author
Owner

@chrisahsiong23 commented on GitHub (Jul 21, 2025):

Hi @rick-github & @yiminghub2024 , I am still getting the same warning - "truncating input prompt" limit=2048, even after setting the ev to OLLAMA_CONTEXT_LENGTH=8192 ollama serve, setting the parameter for ollama run as - /set parameter num_ctx 4096, and specifying the num_ctx parameter through the API. Any other ideas on how to fix this issue? Thank you

<!-- gh-comment-id:3098781368 --> @chrisahsiong23 commented on GitHub (Jul 21, 2025): Hi @rick-github & @yiminghub2024 , I am still getting the same warning - "truncating input prompt" limit=2048, even after setting the ev to OLLAMA_CONTEXT_LENGTH=8192 ollama serve, setting the parameter for ollama run as - /set parameter num_ctx 4096, and specifying the num_ctx parameter through the API. Any other ideas on how to fix this issue? Thank you
Author
Owner

@rick-github commented on GitHub (Jul 21, 2025):

Does the model support a context window greater than 2048 tokens?

<!-- gh-comment-id:3098993896 --> @rick-github commented on GitHub (Jul 21, 2025): Does the model support a context window greater than 2048 tokens?
Author
Owner

@chrisahsiong23 commented on GitHub (Jul 21, 2025):

yes! I am using llama3.2:3b right now.

<!-- gh-comment-id:3099336805 --> @chrisahsiong23 commented on GitHub (Jul 21, 2025): yes! I am using llama3.2:3b right now.
Author
Owner

@rick-github commented on GitHub (Jul 21, 2025):

Server logs may aid in debugging.

<!-- gh-comment-id:3099387399 --> @rick-github commented on GitHub (Jul 21, 2025): [Server logs](https://github.com/ollama/ollama/blob/main/docs/troubleshooting.md#how-to-troubleshoot-issues) may aid in debugging.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#68869