mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-12 02:19:05 +08:00
Fix/grpc gevent compatible (#1314)
Co-authored-by: jyong <jyong@dify.ai>
This commit is contained in:
parent
2851a9f04e
commit
7f6ad9653e
@ -6,6 +6,9 @@ from werkzeug.exceptions import Unauthorized
|
|||||||
if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
|
if not os.environ.get("DEBUG") or os.environ.get("DEBUG").lower() != 'true':
|
||||||
from gevent import monkey
|
from gevent import monkey
|
||||||
monkey.patch_all()
|
monkey.patch_all()
|
||||||
|
if os.environ.get("VECTOR_STORE") == 'milvus':
|
||||||
|
import grpc.experimental.gevent
|
||||||
|
grpc.experimental.gevent.init_gevent()
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import json
|
import json
|
||||||
|
@ -167,8 +167,6 @@ class Milvus(VectorStore):
|
|||||||
self._init()
|
self._init()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
||||||
|
|
||||||
def embeddings(self) -> Embeddings:
|
def embeddings(self) -> Embeddings:
|
||||||
return self.embedding_func
|
return self.embedding_func
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user