Replies: 1 comment
-
actually |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Checked
Feature request
The langchain anthropic client doesn't have
get_num_tokens
implemented. Recently Anthropic added this API to expose a way to count tokens.Motivation
I have a use-case where I want to know what are the number of tokens in my messages array and depending on it, I decide to use different text to pass to the llm if the token count exceeded X tokens
Proposal (If applicable)
This should be stright forward, the only concern I have that
get_num_tokens
is not aContinuous function
. The api should be fast but it would be cool if it's not blocking my asyncio loop.Beta Was this translation helpful? Give feedback.
All reactions