mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-05 21:12:48 +00:00
community[patch]: Fix chat openai unit test (#17124)
- **Description:** Actually the test named `test_openai_apredict` isn't testing the apredict method from ChatOpenAI. - **Twitter handle:** https://twitter.com/OAlmofadas
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from langchain_community.embeddings.openai import OpenAIEmbeddings
|
||||
|
||||
os.environ["OPENAI_API_KEY"] = "foo"
|
||||
|
||||
|
||||
@pytest.mark.requires("openai")
|
||||
def test_openai_invalid_model_kwargs() -> None:
|
||||
@@ -16,5 +12,5 @@ def test_openai_invalid_model_kwargs() -> None:
|
||||
@pytest.mark.requires("openai")
|
||||
def test_openai_incorrect_field() -> None:
|
||||
with pytest.warns(match="not default parameter"):
|
||||
llm = OpenAIEmbeddings(foo="bar")
|
||||
llm = OpenAIEmbeddings(foo="bar", openai_api_key="foo")
|
||||
assert llm.model_kwargs == {"foo": "bar"}
|
||||
|
Reference in New Issue
Block a user