mirror of
https://github.com/ollama/ollama-python.git
synced 2026-07-21 09:05:23 -04:00
Tonkenization of the context #213
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 @Gavin-WangSC on GitHub (Feb 5, 2025).
We see the definition of generate() in client file, there's a context that should be Sequence[int]:
But how can our text be tokenized into the int? Is there such a function inside this ollama libriary?
@ParthSareen commented on GitHub (Feb 11, 2025):
contextshould be a deprecated param: https://github.com/ollama/ollama/blob/main/docs/api.md#generate-a-completionSorry for the confusion, should remove soon.
If you are trying to pass chat history, would recommend using the chat endpoint instead