Skip to content
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

bedrock: How to tokenizer and count tokenizer? #475

Open
kerlion opened this issue Apr 25, 2024 · 4 comments
Open

bedrock: How to tokenizer and count tokenizer? #475

kerlion opened this issue Apr 25, 2024 · 4 comments
Assignees

Comments

@kerlion
Copy link

kerlion commented Apr 25, 2024

It seems that bedrock has lost a lot of features. such as:
How to do tokenization and count tokenizer?

And is there any api guide? I can find 2 simple code examples.

@salahaz
Copy link

salahaz commented Apr 26, 2024

Any updates on this ?

@zwluoqi
Copy link

zwluoqi commented May 4, 2024

wait

@olu-an olu-an assigned dmellott and unassigned x5a May 29, 2024
@bbhorrigan
Copy link

Any update on this coming? I am trying to find some examples.

@olu-an
Copy link

olu-an commented May 31, 2024

Hi @kerlion, A good approach you can consider is to conservatively estimate token count based on historical usage e.g. using byte counts and/or mapping from the usage field in the response.

You can find an example response with the usage field here: https://docs.anthropic.com/en/api/messages-examples#basic-request-and-response.

Please reach out if you have more questions or need further guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants