Tiktoken-enabled function "num_tokens_from_messages" is based on a sample code from OpenAI's GitHub repo. Depending on the model type, it defines relevant Tiktoken parameters and utilises encoding ...