langchain/libs/partners/ollama/tests/unit_tests/test_embeddings.py
Stavros Kontopoulos ac22cde130
langchain_ollama: Support keep_alive in embeddings (#30251)
- Description: Adds support for keep_alive in Ollama Embeddings see
https://github.com/ollama/ollama/issues/6401.
Builds on top of of
https://github.com/langchain-ai/langchain/pull/29296. I have this use
case where I want to keep the embeddings model in cpu forever.
- Dependencies: no deps are being introduced.
- Issue: haven't created an issue yet.
2025-03-14 14:56:50 -04:00

9 lines
233 B
Python

"""Test embedding model integration."""
from langchain_ollama.embeddings import OllamaEmbeddings
def test_initialization() -> None:
"""Test embedding model initialization."""
OllamaEmbeddings(model="llama3", keep_alive=1)