Skip to content

Commit

Permalink
fix: universal chat external_data_tools NPE (langgenius#1467)
Browse files Browse the repository at this point in the history
  • Loading branch information
takatost authored Nov 6, 2023
1 parent 5d48406 commit 2606729
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def from_model_config_dict(self, model_config: dict):
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')
Expand Down

0 comments on commit 2606729

Please sign in to comment.