Skip to content

Commit f5155e7

Browse files
forcemetertikrnews
andauthored
fix: bad code copy (#2341)
Co-authored-by: 杨树海 <[email protected]>
1 parent 66539a7 commit f5155e7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

apps/application/chat_pipeline/step/search_dataset_step/i_search_dataset_step.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class InstanceSerializer(serializers.Serializer):
4343
error_messages=ErrMessage.float(_("Similarity")))
4444
search_mode = serializers.CharField(required=True, validators=[
4545
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
46-
message=_("The type only supports register|reset_password"), code=500)
46+
message=_("The type only supports embedding|keywords|blend"), code=500)
4747
], error_messages=ErrMessage.char(_("Retrieval Mode")))
4848
user_id = serializers.UUIDField(required=True, error_messages=ErrMessage.uuid(_("User ID")))
4949

apps/application/flow/step_node/search_dataset_node/i_search_dataset_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class DatasetSettingSerializer(serializers.Serializer):
2727
error_messages=ErrMessage.float(_('similarity')))
2828
search_mode = serializers.CharField(required=True, validators=[
2929
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
30-
message=_("The type only supports register|reset_password"), code=500)
30+
message=_("The type only supports embedding|keywords|blend"), code=500)
3131
], error_messages=ErrMessage.char(_("Retrieval Mode")))
3232
max_paragraph_char_number = serializers.IntegerField(required=True,
3333
error_messages=ErrMessage.float(_("Maximum number of words in a quoted segment")))

apps/application/serializers/application_serializers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class DatasetSettingSerializer(serializers.Serializer):
126126
_("Maximum number of quoted characters")))
127127
search_mode = serializers.CharField(required=True, validators=[
128128
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
129-
message=_("The type only supports register|reset_password"), code=500)
129+
message=_("The type only supports embedding|keywords|blend"), code=500)
130130
], error_messages=ErrMessage.char(_("Retrieval Mode")))
131131

132132
no_references_setting = NoReferencesSetting(required=True,
@@ -585,7 +585,7 @@ class HitTest(serializers.Serializer):
585585
error_messages=ErrMessage.float(_("Relevance")))
586586
search_mode = serializers.CharField(required=True, validators=[
587587
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
588-
message=_("The type only supports register|reset_password"), code=500)
588+
message=_("The type only supports embedding|keywords|blend"), code=500)
589589
], error_messages=ErrMessage.char(_("Retrieval Mode")))
590590

591591
def is_valid(self, *, raise_exception=False):

apps/dataset/serializers/dataset_serializers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ class HitTest(ApiMixin, serializers.Serializer):
573573
error_messages=ErrMessage.char(_('similarity')))
574574
search_mode = serializers.CharField(required=True, validators=[
575575
validators.RegexValidator(regex=re.compile("^embedding|keywords|blend$"),
576-
message=_('The type only supports register|reset_password'), code=500)
576+
message=_('The type only supports embedding|keywords|blend'), code=500)
577577
], error_messages=ErrMessage.char(_('search mode')))
578578

579579
def is_valid(self, *, raise_exception=True):

0 commit comments

Comments
 (0)