diff --git a/libs/community/langchain_community/chat_models/openai.py b/libs/community/langchain_community/chat_models/openai.py index bf81858618a33..c5cab80f56d7a 100644 --- a/libs/community/langchain_community/chat_models/openai.py +++ b/libs/community/langchain_community/chat_models/openai.py @@ -367,11 +367,11 @@ def validate_environment(cls, values: Dict) -> Dict: def _default_params(self) -> Dict[str, Any]: """ Get the default parameters for calling OpenAI API. - - Reasoning models (o3-mini, o1, o1-mini, o1-preview) does not support adjusting the - temperature parameter. - - + + Reasoning models (o3-mini, o1, o1-mini, o1-preview) does not support adjusting + the temperature parameter. + + """ params = { "model": self.model_name, @@ -379,7 +379,7 @@ def _default_params(self) -> Dict[str, Any]: "n": self.n, **self.model_kwargs, } - o1_reasoning_model = ["o3-mini", "o1", "o1-mini","o1-preview"] + o1_reasoning_model = ["o3-mini", "o1", "o1-mini", "o1-preview"] if self.model_name not in o1_reasoning_model and self.temperature is not None: params["temperature"] = self.temperature if self.max_tokens is not None: