[GH-ISSUE #6560] Logging final input after prompting specified in model file as a debug flag #4128

Closed
opened 2026-04-12 15:01:36 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @adela185 on GitHub (Aug 29, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/6560

Just as the title says, it would be useful to log the final input text given to the model after it undergoes the prompting specified in the model file. This is for the windows preview. The logging already included only prints the parameters and API request, but not the final input.

Originally created by @adela185 on GitHub (Aug 29, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/6560 Just as the title says, it would be useful to log the final input text given to the model after it undergoes the prompting specified in the model file. This is for the windows preview. The logging already included only prints the parameters and API request, but not the final input.
GiteaMirror added the feature request label 2026-04-12 15:01:36 -05:00
Author
Owner

@rick-github commented on GitHub (Aug 29, 2024):

If you add OLLAMA_DEBUG=1 to the server environment, the processed prompt will be logged:

ollama-1  | time=2024-08-29T17:15:51.787Z level=DEBUG source=routes.go:208 msg="generate request" prompt="<|im_start|>user\nhello<|im_end|>\n<|im_start|>assistant\n" images=[]
<!-- gh-comment-id:2318424837 --> @rick-github commented on GitHub (Aug 29, 2024): If you add `OLLAMA_DEBUG=1` to the server environment, the processed prompt will be logged: ``` ollama-1 | time=2024-08-29T17:15:51.787Z level=DEBUG source=routes.go:208 msg="generate request" prompt="<|im_start|>user\nhello<|im_end|>\n<|im_start|>assistant\n" images=[] ```
Author
Owner

@adela185 commented on GitHub (Aug 29, 2024):

Y'know, I probably should've tried that first instead of assuming it was turned on by default on windows... Thanks 😅.

<!-- gh-comment-id:2318541983 --> @adela185 commented on GitHub (Aug 29, 2024): Y'know, I probably should've tried that first instead of assuming it was turned on by default on windows... Thanks 😅.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#4128