You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/upstage/tests/unit_tests/test_embeddings.py

25 lines
594 B
Python

"""Test embedding model integration."""
import os
import pytest
from langchain_upstage import UpstageEmbeddings
os.environ["UPSTAGE_API_KEY"] = "foo"
def test_initialization() -> None:
"""Test embedding model initialization."""
UpstageEmbeddings()
def test_upstage_invalid_model_kwargs() -> None:
with pytest.raises(ValueError):
UpstageEmbeddings(model_kwargs={"model": "foo"})
def test_upstage_incorrect_field() -> None:
with pytest.warns(match="not default parameter"):
llm = UpstageEmbeddings(foo="bar")
assert llm.model_kwargs == {"foo": "bar"}