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

MaxTokens is now depracitated, use MaxCompletionTokens instead #374

Open
Muchaszewski opened this issue Oct 7, 2024 · 0 comments · May be fixed by RageAgainstThePixel/com.openai.unity#303 or #375
Assignees
Labels
enhancement New feature or request

Comments

@Muchaszewski
Copy link

Muchaszewski commented Oct 7, 2024

Feature Request

Is your feature request related to a problem? Please describe.

MaxTokens is now depracitated, use MaxCompletionTokens instead

Describe the solution you'd like

Source: https://platform.openai.com/docs/api-reference/chat/create

max_tokens is Deprecated

Optional
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).

max_completion_tokens

Optional
An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).

Either convert current to non-obsolete max completion tokens or mark it as obsolete and add max_completion_tokens

Other solutions

Add this field manually via overload but ChatResponse is sealed :/

Additional context

https://platform.openai.com/docs/api-reference/chat/create

@Muchaszewski Muchaszewski added the enhancement New feature or request label Oct 7, 2024
@StephenHodgson StephenHodgson self-assigned this Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
2 participants