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/community/tests/unit_tests/embeddings/test_yandex.py

25 lines
844 B
Python

import os
from langchain_community.embeddings import YandexGPTEmbeddings
def test_init() -> None:
os.environ["YC_API_KEY"] = "foo"
models = [
YandexGPTEmbeddings(folder_id="bar"),
YandexGPTEmbeddings(
query_model_uri="emb://bar/text-search-query/latest",
doc_model_uri="emb://bar/text-search-doc/latest",
),
YandexGPTEmbeddings(
folder_id="bar",
query_model_name="text-search-query",
doc_model_name="text-search-doc",
),
]
for embeddings in models:
assert embeddings.model_uri == "emb://bar/text-search-query/latest"
assert embeddings.doc_model_uri == "emb://bar/text-search-doc/latest"
assert embeddings.model_name == "text-search-query"
assert embeddings.doc_model_name == "text-search-doc"