extensions/openai: Fix error when preparing cache for embedding models (#3995)

This commit is contained in:
Chenxiao Wang 2023-09-24 11:58:28 +08:00 committed by GitHub
parent 7a3ca2c68f
commit 9de2dfa887
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -6,7 +6,6 @@
import os
import sentence_transformers
from extensions.openai.script import params
st_model = os.environ.get("OPENEDAI_EMBEDDING_MODEL", params.get('embedding_model', 'all-mpnet-base-v2'))
st_model = os.environ.get("OPENEDAI_EMBEDDING_MODEL", "all-mpnet-base-v2")
model = sentence_transformers.SentenceTransformer(st_model)