fix: embedding_model_dict used for bge-* models (#1628)

change to use `get_model_path`
This commit is contained in:
liunux4odoo 2023-09-29 18:57:15 +08:00 committed by GitHub
parent b11d6ab5bb
commit eb6f5cf84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ class EmbeddingsPool(CachePool):
else:
# maybe ReRanker or else, just use empty string instead
query_instruction = ""
embeddings = HuggingFaceBgeEmbeddings(model_name=embedding_model_dict[model],
embeddings = HuggingFaceBgeEmbeddings(model_name=get_model_path(model),
model_kwargs={'device': device},
query_instruction=query_instruction)
if model == "bge-large-zh-noinstruct": # bge large -noinstruct embedding