Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: ollama text embedding 500 error (#8131)

crazywoolaa27d4d58ec4c
diff --git a/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py b/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py
index 9e26d35afc9..8f7d54c5167 100644
--- a/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py
+++ b/api/core/model_runtime/model_providers/ollama/text_embedding/text_embedding.py
@@ -89,7 +89,8 @@ class OllamaEmbeddingModel(TextEmbeddingModel):
endpoint_url,
headers=headers,
data=json.dumps(payload),
- timeout=(10, 300)
+ timeout=(10, 300),
+ options={"use_mmap": "true"}
)
response.raise_for_status() # Raise an exception for HTTP errors