mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-17 16:39:52 +00:00
- 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.
9 lines
233 B
Python
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)
|