mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
embedding model check when init the knowledge (#10463)
This commit is contained in:
parent
7c2a9b0744
commit
d52c750942
|
@ -317,8 +317,11 @@ class DatasetInitApi(Resource):
|
|||
raise ValueError("embedding model and embedding model provider are required for high quality indexing.")
|
||||
try:
|
||||
model_manager = ModelManager()
|
||||
model_manager.get_default_model_instance(
|
||||
tenant_id=current_user.current_tenant_id, model_type=ModelType.TEXT_EMBEDDING
|
||||
model_manager.get_model_instance(
|
||||
tenant_id=current_user.current_tenant_id,
|
||||
provider=args["embedding_model_provider"],
|
||||
model_type=ModelType.TEXT_EMBEDDING,
|
||||
model=args["embedding_model"],
|
||||
)
|
||||
except InvokeAuthorizationError:
|
||||
raise ProviderNotInitializeError(
|
||||
|
|
Loading…
Reference in New Issue
Block a user