Skip to content

Commit

Permalink
bug: (langgenius#7586 followup) fix config of CODE_MAX_STRING_LENGTH (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 authored and monstaruos committed Aug 29, 2024
1 parent 0474f0c commit f813d47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/core/workflow/nodes/code/code_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ def _check_string(self, value: str, variable: str) -> str:
else:
raise ValueError(f"Output variable `{variable}` must be a string")

if len(value) > dify_config.CODE_MAX_STRING_ARRAY_LENGTH:
if len(value) > dify_config.CODE_MAX_STRING_LENGTH:
raise ValueError(f'The length of output variable `{variable}` must be'
f' less than {dify_config.CODE_MAX_STRING_ARRAY_LENGTH} characters')
f' less than {dify_config.CODE_MAX_STRING_LENGTH} characters')

return value.replace('\x00', '')

Expand Down

0 comments on commit f813d47

Please sign in to comment.