mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-25 04:49:17 +00:00
openai[patch]: default temp=1 for o1 (#27206)
This commit is contained in:
@@ -35,6 +35,13 @@ def test_openai_model_param() -> None:
|
||||
assert llm.model_name == "foo"
|
||||
|
||||
|
||||
def test_openai_o1_temperature() -> None:
|
||||
llm = ChatOpenAI(model="o1-preview")
|
||||
assert llm.temperature == 1
|
||||
llm = ChatOpenAI(model_name="o1-mini") # type: ignore[call-arg]
|
||||
assert llm.temperature == 1
|
||||
|
||||
|
||||
def test_function_message_dict_to_function_message() -> None:
|
||||
content = json.dumps({"result": "Example #1"})
|
||||
name = "test_function"
|
||||
|
Reference in New Issue
Block a user