mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
fix(openai): add model property (#35284)
This commit is contained in:
@@ -86,8 +86,10 @@ from langchain_openai.chat_models.base import (
|
||||
def test_openai_model_param() -> None:
|
||||
llm = ChatOpenAI(model="foo")
|
||||
assert llm.model_name == "foo"
|
||||
assert llm.model == "foo"
|
||||
llm = ChatOpenAI(model_name="foo") # type: ignore[call-arg]
|
||||
assert llm.model_name == "foo"
|
||||
assert llm.model == "foo"
|
||||
|
||||
llm = ChatOpenAI(max_tokens=10) # type: ignore[call-arg]
|
||||
assert llm.max_tokens == 10
|
||||
|
||||
Reference in New Issue
Block a user