New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: get_num_tokens - default tokenizer #2439
Comments
I took a look at the repo and here the wrapper for openai uses the tiktoken library. If this doesn't help could you provide the exact files you saw this since you doc link doesn't show the exact code ? |
A tiny update in docs which is spotted here: #2439
A tiny update in docs which is spotted here: langchain-ai/langchain#2439
Hi, @nikitajz! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale. From what I understand, the issue was about a documentation error regarding the default tokenizer used in the Before we close this issue, we wanted to check with you if it is still relevant to the latest version of the LangChain repository. If it is, please let us know by commenting on the issue. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days. Thank you for your contribution and please don't hesitate to reach out if you have any further questions or concerns! |
Hi!
I've noticed in theModels -> LLM
documentation the following note aboutget_num_tokens
function:It looks not exactly correct since Huggingface is used only in legacy versions (< 3.8), so it probably outdated.tiktoken
package that can be reused in the function get_num_tokens:https://github.com/openai/tiktoken/blob/46287bfa493f8ccca4d927386d7ea9cc20487525/tiktoken/model.py#L13-L53
The text was updated successfully, but these errors were encountered: