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[patch]: use max_completion_tokens in place of max_tokens #26917

Merged
merged 14 commits into from
Nov 26, 2024

Conversation

ccurme
Copy link
Collaborator

@ccurme ccurme commented Sep 26, 2024

@efriis efriis added the partner label Sep 26, 2024
@efriis efriis self-assigned this Sep 26, 2024
Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Nov 26, 2024 4:26pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. langchain Related to the langchain package labels Sep 26, 2024
@ccurme ccurme removed the langchain Related to the langchain package label Sep 26, 2024
@ccurme
Copy link
Collaborator Author

ccurme commented Sep 26, 2024

@DuhastMish
Copy link

How soon should we expect these changes?

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Oct 3, 2024
@@ -435,7 +435,7 @@ class BaseChatOpenAI(BaseChatModel):
"""Number of chat completions to generate for each prompt."""
top_p: Optional[float] = None
"""Total probability mass of tokens to consider at each step."""
max_tokens: Optional[int] = None
max_tokens: Optional[int] = Field(default=None, alias="max_completion_tokens")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to update azure openai as well? if someone is passing in max_completion_tokens to azure today this change will update so instead max_tokens is passed in

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Nov 26, 2024
@baskaryan baskaryan enabled auto-merge (squash) November 26, 2024 16:19
@baskaryan baskaryan merged commit 42b1882 into master Nov 26, 2024
40 checks passed
@baskaryan baskaryan deleted the cc/oai_max_tokens branch November 26, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm PR looks good. Use to confirm that a PR is ready for merging. partner size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants