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

Unified way to know max input / output tokens for a model #6

Open
jjroelofs opened this issue Feb 4, 2025 · 1 comment
Open

Unified way to know max input / output tokens for a model #6

jjroelofs opened this issue Feb 4, 2025 · 1 comment

Comments

@jjroelofs
Copy link

It would be great to have this. Any plans or existing code for this? I noticed there is only a function for this in the Anthropic code:

getMaxTokens(model: string): number {
if (model.includes('claude-3-5-sonnet') || model.includes('computer-use')) return 8192
else return 4096
}

@nbonamy
Copy link
Owner

nbonamy commented Feb 4, 2025

Don't think that exists but will check again. The function in anthropic.ts exists because this parameter is required when calling Anthropic API. And to be honest this is painful: while checking the docs I realize the implementation is obsolete and needs to be updated.

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

2 participants