ollama / ollama/ollama-python

Ollama chat stream Newline

Open
#273 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.5k
Forks
1.2k
Avg merge
4m
Merged PRs (30d)
1

Description

Hi guys,

I am wondering if the streaming of ollama.chat also produces newline? I created program that streams the message via api and received at the other end in javascript fetch. The problem is it is not formatting the response with newlines even if I ask it to seperate into paragraphs. I am wondering if ollama.chat(stream=True) does not produce newline characters.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with ollama.chat(stream=True) and reproduce the streamed response as received through JavaScript fetch. Compare the stream contents with the requested paragraph formatting; done means establishing whether newline characters are emitted and documenting or correcting the observed behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
ollama, python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.