We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1799684 commit 9748c93Copy full SHA for 9748c93
backend/apps/ai_model/embedding.py
@@ -8,6 +8,8 @@
8
9
from common.core.config import settings
10
11
+os.environ["TOKENIZERS_PARALLELISM"] = "false"
12
+
13
14
class EmbeddingModelInfo(BaseModel):
15
folder: str
@@ -49,7 +51,6 @@ def _get_lock(key: str = settings.DEFAULT_EMBEDDING_MODEL):
49
51
@staticmethod
50
52
def get_model(key: str = settings.DEFAULT_EMBEDDING_MODEL,
53
config: EmbeddingModelInfo = local_embedding_model) -> Embeddings:
- global _embedding_model
54
model_instance = _embedding_model.get(key)
55
if model_instance is None:
56
lock = EmbeddingModelCache._get_lock(key)
0 commit comments