mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Max token question #61
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tonyphoang on GitHub (Mar 27, 2024).
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=[])@cyx2000 commented on GitHub (Mar 30, 2024):
set it in options, like this

@hasan-sayeed commented on GitHub (Dec 5, 2024):
@cyx2000, I was facing the same issue. Your suggestion worked. Thanks!