瀏覽代碼

Fix/grpc gevent compatible (#1314)

Co-authored-by: jyong <jyong@dify.ai>
tags/0.3.27
Jyong 2 年之前
父節點
當前提交
7f6ad9653e
沒有連結到貢獻者的電子郵件帳戶。
共有 2 個檔案被更改,包括 3 行新增2 行删除
  1. 3
    0
      api/app.py
  2. 0
    2
      api/core/index/vector_index/milvus.py

+ 3
- 0
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

+ 0
- 2
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


Loading…
取消
儲存