fix: default model set wrong(#6327) (#6332)

Co-authored-by: maiyouming <maiyouming@yafex.cn>
This commit is contained in:
FamousMai 2024-07-17 14:14:12 +08:00 committed by GitHub
parent 4e2fba404d
commit 20f73cb756
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -98,7 +98,7 @@ class AppService:
model_instance = None
if model_instance:
if model_instance.model == default_model_config['model']['name']:
if model_instance.model == default_model_config['model']['name'] and model_instance.provider == default_model_config['model']['provider']:
default_model_dict = default_model_config['model']
else:
llm_model = cast(LargeLanguageModel, model_instance.model_type_instance)