extensions/openai: load extension settings via settings.yaml (#3953)
This commit is contained in:
parent
cc8eda298a
commit
347aed4254
6 changed files with 48 additions and 16 deletions
|
@ -6,6 +6,7 @@
|
|||
import os
|
||||
|
||||
import sentence_transformers
|
||||
from extensions.openai.script import params
|
||||
|
||||
st_model = os.environ["OPENEDAI_EMBEDDING_MODEL"] if "OPENEDAI_EMBEDDING_MODEL" in os.environ else "all-mpnet-base-v2"
|
||||
st_model = os.environ.get("OPENEDAI_EMBEDDING_MODEL", params.get('embedding_model', 'all-mpnet-base-v2'))
|
||||
model = sentence_transformers.SentenceTransformer(st_model)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue