openai: fix loads unit test (#21542)

following changes to tests in core here:
https://github.com/langchain-ai/langchain/pull/21342/files
This commit is contained in:
ccurme 2024-05-10 14:46:34 -04:00 committed by GitHub
parent d3ff9c5d6a
commit 4170e72a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5,7 +5,7 @@ from langchain_openai import ChatOpenAI, OpenAI
def test_loads_openai_llm() -> None:
llm = OpenAI(model="davinci", temperature=0.5, openai_api_key="hello")
llm = OpenAI(model="davinci", temperature=0.5, openai_api_key="hello", top_p=0.8)
llm_string = dumps(llm)
llm2 = loads(llm_string, secrets_map={"OPENAI_API_KEY": "hello"})