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/grpc gevent compatible (#1314)

Jyong7f6ad9653e59
diff --git a/api/app.py b/api/app.py
index 7a0a61db75b..ef32ad44e1f 100644
--- a/api/app.py
+++ b/api/app.py
@@ -6,6 +6,9 @@ from werkzeug.exceptions import Unauthorized
if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
from gevent import monkey
monkey.patch_all()
+ if os.environ.get("VECTOR_STORE") == 'milvus':
+ import grpc.experimental.gevent
+ grpc.experimental.gevent.init_gevent()
import logging
import json
diff --git a/api/core/index/vector_index/milvus.py b/api/core/index/vector_index/milvus.py
index 067d48b5a63..013172d8261 100644
--- a/api/core/index/vector_index/milvus.py
+++ b/api/core/index/vector_index/milvus.py
@@ -167,8 +167,6 @@ class Milvus(VectorStore):
self._init()
@property
-
-
def embeddings(self) -> Embeddings:
return self.embedding_func