mirror of
https://github.com/hwchase17/langchain
synced 2024-11-11 19:11:02 +00:00
34d2daffb3
- **Description:** Actually the test named `test_openai_apredict` isn't testing the apredict method from ChatOpenAI. - **Twitter handle:** https://twitter.com/OAlmofadas
17 lines
497 B
Python
17 lines
497 B
Python
import pytest
|
|
|
|
from langchain_community.embeddings.openai import OpenAIEmbeddings
|
|
|
|
|
|
@pytest.mark.requires("openai")
|
|
def test_openai_invalid_model_kwargs() -> None:
|
|
with pytest.raises(ValueError):
|
|
OpenAIEmbeddings(model_kwargs={"model": "foo"})
|
|
|
|
|
|
@pytest.mark.requires("openai")
|
|
def test_openai_incorrect_field() -> None:
|
|
with pytest.warns(match="not default parameter"):
|
|
llm = OpenAIEmbeddings(foo="bar", openai_api_key="foo")
|
|
assert llm.model_kwargs == {"foo": "bar"}
|