Skip to content

How to change top_p in ChatOpenAI #14887

Answered by dosubot bot
SpaceDandy13 asked this question in Q&A
Discussion options

You must be logged in to vote

🤖

Hey there, @SpaceDandy13! 👋 I'm Dosu, your friendly bot helper. I'm here to assist you with bugs, answer your questions, and guide you towards becoming a contributor while the human maintainers are busy. Just think of me as your personal guide in the world of LangChain. Let's tackle this coding journey together, shall we? 😊🚀

To modify the top_p parameter in the ChatOpenAI class in LangChain, you can pass it as a key-value pair in the model_kwargs dictionary when creating an instance of the ChatOpenAI class. The model_kwargs dictionary holds any model parameters valid for the create call that are not explicitly specified in the class.

Here is an example of how you can do this:

from langc…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SpaceDandy13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant