langchain/libs/partners/ollama/tests/integration_tests/test_embeddings.py
Mason Daugherty ee4c2510eb
feat: port various nit changes from wip-v0.4 (#32506)
Lots of work that wasn't directly related to core
improvements/messages/testing functionality
2025-08-11 15:09:08 -04:00

20 lines
495 B
Python

"""Test Ollama embeddings."""
import os
from langchain_tests.integration_tests import EmbeddingsIntegrationTests
from langchain_ollama.embeddings import OllamaEmbeddings
MODEL_NAME = os.environ.get("OLLAMA_TEST_MODEL", "llama3.1")
class TestOllamaEmbeddings(EmbeddingsIntegrationTests):
@property
def embeddings_class(self) -> type[OllamaEmbeddings]:
return OllamaEmbeddings
@property
def embedding_model_params(self) -> dict:
return {"model": MODEL_NAME}