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

OpenAI max_token is deprecated #893

Open
cescoffier opened this issue Sep 16, 2024 · 3 comments
Open

OpenAI max_token is deprecated #893

cescoffier opened this issue Sep 16, 2024 · 3 comments

Comments

@cescoffier
Copy link
Collaborator

max_tokens (Deprecated):  The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.

This value is now deprecated in favor of max_completion_tokens, and is not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).

We would need to switch to the new parameter only if the provider is OpenAI.

@geoand
Copy link
Collaborator

geoand commented Sep 16, 2024

cc @langchain4j

@langchain4j
Copy link
Collaborator

Just released openai4j 0.21.0 which includes max_completion_tokens

@geoand
Copy link
Collaborator

geoand commented Sep 16, 2024

💪🏽

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

3 participants