mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
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.
This commit is contained in:
committed by
GitHub
parent
65a8f30729
commit
ac22cde130
@@ -5,4 +5,4 @@ from langchain_ollama.embeddings import OllamaEmbeddings
|
||||
|
||||
def test_initialization() -> None:
|
||||
"""Test embedding model initialization."""
|
||||
OllamaEmbeddings(model="llama3")
|
||||
OllamaEmbeddings(model="llama3", keep_alive=1)
|
||||
|
||||
Reference in New Issue
Block a user