encoding property

String encoding
getter/setter pair

The encoding to use by tiktoken when tokenize is called.

Ollama does not provide any API to count tokens, so we use tiktoken to get an estimation of the number of tokens in a prompt.

Implementation

String encoding;