[GH-ISSUE #150] Need word wrap #62092

Closed
opened 2026-05-03 07:29:27 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @nathanleclaire on GitHub (Jul 20, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/150

image

It pains me

Originally created by @nathanleclaire on GitHub (Jul 20, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/150 <img width="97" alt="image" src="https://github.com/jmorganca/ollama/assets/1476820/fa92e643-a994-46ab-b83c-df3e28fbf758"> It pains me
GiteaMirror added the feature request label 2026-05-03 07:29:27 -05:00
Author
Owner

@pdevine commented on GitHub (Aug 9, 2023):

This is really hard to do because the tokens come back not as complete words but as token fragments. We don't know if the next token is going to be over the size of your terminal or not.

Some thoughts:

  • we could look at the terminal size and if we know the token table we could just wrap if we're under the size of the largest token (I don't know what the size of the largest token is though!)
  • could we just tell the LLM to give back its response with word wrapping?
<!-- gh-comment-id:1672265640 --> @pdevine commented on GitHub (Aug 9, 2023): This is really hard to do because the tokens come back not as complete words but as token fragments. We don't know if the next token is going to be over the size of your terminal or not. Some thoughts: * we could look at the terminal size and if we know the token table we could just wrap if we're under the size of the largest token (I don't know what the size of the largest token is though!) * could we just tell the LLM to give back its response with word wrapping?
Author
Owner

@jmorganca commented on GitHub (Aug 23, 2023):

Going to close this one for now – we'd love for some richer web or cli clients to support this and would want to avoid too much formatting and stick to the raw terminal emulator. That said if there's an easy way feel free to reopen!

<!-- gh-comment-id:1690380456 --> @jmorganca commented on GitHub (Aug 23, 2023): Going to close this one for now – we'd love for some richer web or cli clients to support this and would want to avoid too much formatting and stick to the raw terminal emulator. That said if there's an easy way feel free to reopen!
Author
Owner

@mxyng commented on GitHub (Sep 26, 2023):

Resolved in #553

<!-- gh-comment-id:1736414341 --> @mxyng commented on GitHub (Sep 26, 2023): Resolved in #553
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#62092