mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-15 15:46:47 +00:00
Lots of work that wasn't directly related to core improvements/messages/testing functionality
20 lines
495 B
Python
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}
|