ollama / ollama/ollama-python

Max token question

Open
#101 3 comments 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

How do you set the max token with ollama python?
My code doesn't seem to work. Thanks!
output=ollama.chat(model='my_model',max_token=5, messages=[])

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

The issue names the ollama.chat call and shows a max_token argument; start by checking that call's documented parameters and reproducing the snippet with a minimal message. Done means the supported way to set the token limit is documented and the reported behavior is explained or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
ollama, python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.