Skip to content

Commit f649d64

Browse files
committed
fix: correct 'does not exists' in two model error messages
Subject-verb agreement: 'Model does not exists or is not an LLM model' -> 'Model does not exist ...' in the tool and chat serializers.
1 parent a7ae95b commit f649d64

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/chat/serializers/chat.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def generate_prompt(self, instance: dict):
185185
model_type__in=SUPPORTED_MODEL_TYPES
186186
).exists()
187187
if not model_exist:
188-
raise Exception(_("Model does not exists or is not an LLM model"))
188+
raise Exception(_("Model does not exist or is not an LLM model"))
189189

190190
def process():
191191
model = get_model_instance_by_model_workspace_id(model_id=model_id, workspace_id=workspace_id,

‎apps/tools/serializers/tool.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ def generate_code(self):
16401640
SUPPORTED_MODEL_TYPES = ["LLM"]
16411641
model_exist = QuerySet(Model).filter(id=model_id, model_type__in=SUPPORTED_MODEL_TYPES).exists()
16421642
if not model_exist:
1643-
raise Exception(_("Model does not exists or is not an LLM model"))
1643+
raise Exception(_("Model does not exist or is not an LLM model"))
16441644

16451645
def process():
16461646
model = get_model_instance_by_model_workspace_id(

0 commit comments

Comments
 (0)