We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 428a04a commit b2e6196Copy full SHA for b2e6196
1 file changed
src/praisonai/praisonai/inc/models.py
@@ -138,11 +138,15 @@ def get_model(self):
138
"Please install with 'pip install langchain-anthropic'"
139
)
140
elif OPENAI_AVAILABLE:
141
- return ChatOpenAI(
142
- model=self.model_name,
143
- api_key=self.api_key,
144
- base_url=self.base_url,
145
- )
+ chat_kwargs = {
+ "model": self.model_name,
+ "api_key": self.api_key,
+ "base_url": self.base_url,
+ }
146
+ # Certain OpenAI models (e.g., gpt-5-* family) only allow temperature=1
147
+ if isinstance(self.model_name, str) and self.model_name.startswith("gpt-5"):
148
+ chat_kwargs["temperature"] = 1
149
+ return ChatOpenAI(**chat_kwargs)
150
else:
151
raise ImportError(
152
"Required Langchain Integration 'langchain-openai' not found. "
0 commit comments