[GH-ISSUE #7840] Please add a way to view the request after a template is applied #67068

Closed
opened 2026-05-04 09:24:23 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @vt-alt on GitHub (Nov 26, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/7840

Would be nice to view raw requests passing between ollama and model. This would be useful to debug templates (for example to debug requests with tools) and for education purposes to see how things works low level.

Originally created by @vt-alt on GitHub (Nov 26, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/7840 Would be nice to view raw requests passing between ollama and model. This would be useful to debug templates (for example to debug requests with tools) and for education purposes to see how things works low level.
GiteaMirror added the feature request label 2026-05-04 09:24:23 -05:00
Author
Owner

@rick-github commented on GitHub (Nov 26, 2024):

If you set OLLAMA_DEBUG=1 in the server environment the templated prompt will be written to the log, search for msg="generate request" or msg="chat request", depending on which endpoint you use.

<!-- gh-comment-id:2500318663 --> @rick-github commented on GitHub (Nov 26, 2024): If you set `OLLAMA_DEBUG=1` in the server environment the templated prompt will be written to the log, search for `msg="generate request"` or `msg="chat request"`, depending on which endpoint you use.
Author
Owner

@vt-alt commented on GitHub (Nov 26, 2024):

Thank you! I don't get the replies there though, only can see the reply in the next request.

<!-- gh-comment-id:2501782043 --> @vt-alt commented on GitHub (Nov 26, 2024): Thank you! I don't get the replies there though, only can see the reply in the next request.
Author
Owner

@du291 commented on GitHub (Jun 5, 2025):

This does not seem to work in 0.9.0. Loglevel DEBUG does not contain the raw messages to and from the model.

<!-- gh-comment-id:2943352620 --> @du291 commented on GitHub (Jun 5, 2025): This does not seem to work in 0.9.0. Loglevel DEBUG does not contain the raw messages to and from the model.
Author
Owner

@rick-github commented on GitHub (Jun 5, 2025):

OLLAMA_DEBUG=2

<!-- gh-comment-id:2943358186 --> @rick-github commented on GitHub (Jun 5, 2025): `OLLAMA_DEBUG=2`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#67068