Inconsistent API Behavior #132

Closed
opened 2026-02-15 16:28:12 -05:00 by yindo · 2 comments
Owner

Originally created by @negaralizadeh on GitHub (Aug 12, 2024).

I checked the documentation several times and I'm using the generate function in this way:

options = {
"temperature": 0.2,
"top_p": 0.8,
"seed": 42,
"num_predict": 300,
}
ollama.generate(model=model_name, prompt=prompt, stream=False, options=options, system=system_message, format="json")

Although I set the stream flag to false, I still don't get the whole response in one package (done = False in the first received package).
The other problem is that sometimes, even when the package is final (done=true), I don't see all the expected additional information there for example prompt_eval_count is missing.

Am I doing something wrong here?

Originally created by @negaralizadeh on GitHub (Aug 12, 2024). I checked the documentation several times and I'm using the generate function in this way: options = { "temperature": 0.2, "top_p": 0.8, "seed": 42, "num_predict": 300, } ollama.generate(model=model_name, prompt=prompt, stream=False, options=options, system=system_message, format="json") Although I set the **stream flag to false**, I still don't get the whole response in one package (done = False in the first received package). The other problem is that sometimes, even when the package is final (done=true), I don't see all the expected additional information there for example _prompt_eval_count_ is missing. Am I doing something wrong here?
yindo closed this issue 2026-02-15 16:28:12 -05:00
Author
Owner

@ParthSareen commented on GitHub (Nov 21, 2024):

Hey! Are you still running into this? If so could you send an example of a run and the output it gives you.

@ParthSareen commented on GitHub (Nov 21, 2024): Hey! Are you still running into this? If so could you send an example of a run and the output it gives you.
Author
Owner

@ParthSareen commented on GitHub (Nov 26, 2024):

Closing out as stale

@ParthSareen commented on GitHub (Nov 26, 2024): Closing out as stale
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ollama/ollama-python#132