Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/application/flow/step_node/loop_node/i_loop_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ def is_valid(self, *, raise_exception=False):
if loop_type == 'ARRAY':
array = self.data.get('array')
if array is None or len(array) == 0:
message = _('{field}, this field is required.', field='array')
message = _('{field}, this field is required.').format(field='array')
raise AppApiException(500, message)
elif loop_type == 'NUMBER':
number = self.data.get('number')
if number is None:
message = _('{field}, this field is required.', field='number')
message = _('{field}, this field is required.').format(field='number')
raise AppApiException(500, message)


Expand Down
2 changes: 1 addition & 1 deletion apps/common/utils/tool_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def _set_resource_limit():
)
return subprocess_result
except subprocess.TimeoutExpired:
raise Exception(_(f"Process execution timed out after {_process_limit_timeout_seconds} seconds."))
raise Exception(_("Process execution timed out after {} seconds.").format(_process_limit_timeout_seconds))

def validate_mcp_transport(self, code_str):
servers = json.loads(code_str)
Expand Down
2 changes: 1 addition & 1 deletion apps/locales/zh_CN/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ msgstr "字段仅支持自定义|引用"

#: apps/application/flow/step_node/function_node/i_function_node.py:40
msgid "{field}, this field is required."
msgstr "{field_label} 字段是必填项"
msgstr "{field} 字段是必填项"

#: apps/application/flow/step_node/function_node/i_function_node.py:46
msgid "function"
Expand Down
5 changes: 4 additions & 1 deletion apps/locales/zh_Hant/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ msgstr "欄位僅支持自定義|引用"

#: apps/application/flow/step_node/function_node/i_function_node.py:40
msgid "{field}, this field is required."
msgstr "{field_label} 欄位是必填項"
msgstr "{field} 欄位是必填項"

#: apps/application/flow/step_node/function_node/i_function_node.py:46
msgid "function"
Expand Down Expand Up @@ -8629,6 +8629,9 @@ msgstr "API KEY"
msgid "Download"
msgstr "下載"

msgid "User"
msgstr "用戶"

msgid "Delete personal system API_KEY"
msgstr "删除個人系統API KEY"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def text_to_speech(self, text):
if audio_hex:
audio = bytes.fromhex(audio_hex)
else:
raise Exception('Failed to get audio data from response' + str(response.text))
raise Exception(f"Failed to get audio data from response: {str(response.text)}")
else:
from dashscope.audio.tts_v2 import SpeechSynthesizer
synthesizer = SpeechSynthesizer(model=self.model, **self.params)
Expand Down
Loading