[GH-ISSUE #2397] Empty message content causes request to hang #27156

Closed
opened 2026-04-22 04:08:09 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @jmorganca on GitHub (Feb 7, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/2397

To reproduce:

curl http://localhost:11434/api/chat -d '{
  "model": "llama2",
  "messages": [
    {
      "role": "user",
      "content": ""
    }
  ]
}'
Originally created by @jmorganca on GitHub (Feb 7, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/2397 To reproduce: ``` curl http://localhost:11434/api/chat -d '{ "model": "llama2", "messages": [ { "role": "user", "content": "" } ] }' ```
GiteaMirror added the bug label 2026-04-22 04:08:09 -05:00
Author
Owner

@cedws commented on GitHub (Feb 8, 2024):

I still have this issue on 0.1.24. Providing an empty prompt in an existing context causes Ollama to completely crash and not serve any requests on any models anymore.

Unfortunately I'm unable to provide a repro right now.

<!-- gh-comment-id:1935071723 --> @cedws commented on GitHub (Feb 8, 2024): I still have this issue on 0.1.24. Providing an empty prompt in an existing context causes Ollama to completely crash and not serve any requests on any models anymore. Unfortunately I'm unable to provide a repro right now.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#27156