tiktoken: get number of tokens from string + openai pricing

Get the number of tokens The encoding cl100k_base is used by gpt-4, gpt-3.5-turbo, text-embedding-ada-002.This is how you encode a string into the tokens. You can abstract this into a separate function. Source: openai-cookbook (github) OpenAI Pricing As of November 22, 2023 Splitting chunks for to manage Context Window Limits gpt-3.5-turbo-1106 has a limit of 16,385…