fix: universal chat external_data_tools NPE (#1467)

This commit is contained in:
takatost 2023-11-06 22:08:53 +08:00 committed by GitHub
parent 5d48406d64
commit 260672986e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,7 +197,8 @@ class AppModelConfig(db.Model):
self.more_like_this = json.dumps(model_config['more_like_this'])
self.sensitive_word_avoidance = json.dumps(model_config['sensitive_word_avoidance']) \
if model_config.get('sensitive_word_avoidance') else None
self.external_data_tools = json.dumps(model_config['external_data_tools'])
self.external_data_tools = json.dumps(model_config['sensitive_word_avoidance']) \
if model_config.get('external_data_tools') else None
self.model = json.dumps(model_config['model'])
self.user_input_form = json.dumps(model_config['user_input_form'])
self.dataset_query_variable = model_config.get('dataset_query_variable')