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
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def execute(self, message_list: List[BaseMessage],
mcp_output_enable=True,
**kwargs):
chat_model = get_model_instance_by_model_workspace_id(model_id, workspace_id,
**model_params_setting) if model_id is not None else None
**(model_params_setting or {})) if model_id is not None else None
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

避免报空

if stream:
return self.execute_stream(message_list, chat_id, problem_text, post_response_handler, chat_model,
paragraph_list,
Expand Down
2 changes: 1 addition & 1 deletion apps/application/flow/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def is_valid_model_params(self):
node.properties.get('node_data', {})['model_params_setting'] = model_params_setting
if node.properties.get('status', 200) != 200:
raise ValidationError(
ErrorDetail(_("Node {node} is unavailable").format(node.properties.get("stepName"))))
ErrorDetail(_("Node {node} is unavailable").format(node=node.properties.get("stepName"))))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

未指定参数名 node

node_list = [node for node in self.nodes if (node.type == 'function-lib-node')]
for node in node_list:
function_lib_id = node.properties.get('node_data', {}).get('function_lib_id')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def execute(self, **kwargs) -> NodeResult:
return NodeResult({'document_list': document_list, 'source_url': source_url, 'selector': selector},
self.workflow_manage.params.get('knowledge_base') or {})
maxkb_logger.error(_('data source web node:{node_id} error{error}{traceback}').format(
knowledge_id=node_id, error=str(e), traceback=traceback.format_exc()))
node_id=node_id, error=str(e), traceback=traceback.format_exc()))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参数名错误,正确的是 node_id


def get_details(self, index: int, **kwargs):
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def valid_reference_value(_type, value, name):
else:
raise Exception(_(
'Field: {name} Type: {_type} Value: {value} Unsupported types'
).format(name=name, _type=_type))
).format(name=name, _type=_type, value=value))
except:
return value
if not isinstance(value, instance_type):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def valid_reference_value(_type, value, name):
else:
raise Exception(_(
'Field: {name} Type: {_type} Value: {value} Unsupported types'
).format(name=name, _type=_type))
).format(name=name, _type=_type, value=value))
except:
return value
if not isinstance(value, instance_type):
Expand Down
4 changes: 2 additions & 2 deletions apps/knowledge/task/embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ def embedding_by_knowledge(knowledge_id, model_id):
pass
except Exception as e:
maxkb_logger.error(
_('Vectorized knowledge: {knowledge_id} error {error} {traceback}'.format(knowledge_id=knowledge_id,
_('Vectorized knowledge: {knowledge_id} error {error} {traceback}').format(knowledge_id=knowledge_id,
Copy link
Copy Markdown
Contributor Author

@wangliang181230 wangliang181230 Apr 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

format方法,在 _(...) 方法内部使用了,会导致多语言失效。

error=str(e),
traceback=traceback.format_exc())))
traceback=traceback.format_exc()))
finally:
maxkb_logger.info(_('End--->Vectorized knowledge: {knowledge_id}').format(knowledge_id=knowledge_id))

Expand Down
2 changes: 1 addition & 1 deletion apps/trigger/handler/impl/trigger/event_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def valid_parameter_type(value, _type, desc):
else:
raise Exception(_(
'Field: {name} Type: {_type} Value: {value} Unsupported types'
).format(name=desc, _type=_type))
).format(name=desc, _type=_type, value=value))
except:
return value
if not isinstance(value, instance_type):
Expand Down
Loading