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

Fix temperature parameter will not be consider for reasoning models community/llms/openai.py #29551

Conversation

rawathemant246
Copy link
Contributor

Additional guidelines:

  • Optional dependencies are imported within a function.
  • No dependencies were added to pyproject.toml files.
  • This PR modifies only the community package.
  • Changes are backwards compatible.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 3, 2025
Copy link

vercel bot commented Feb 3, 2025

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 Feb 3, 2025 9:47am

@dosubot dosubot bot added community Related to langchain-community 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Feb 3, 2025
@rawathemant246 rawathemant246 changed the title Fix temperature parameter will not be consider for reasoning models Fix temperature parameter will not be consider for reasoning models community/llms/openai.py Feb 3, 2025
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

Thanks for this.

The community implementation of ChatOpenAI is deprecated-- you should be seeing warnings directing you to the langchain-openai implementation. This implementation has a null default temperature.

I think if a user passes in:

llm = ChatOpenAI(model="o1", temperature=0)

It is reasonable to pass this through to openai and raise an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature community Related to langchain-community size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants