-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: When the execution fails, the execution details still show as successful in the [Knowledge Base Workflow] #4494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,7 +71,7 @@ def save_context(self, details, workflow_manage): | |
| if self.node_params.get('is_result', False): | ||
| self.answer_text = details.get('answer') | ||
|
|
||
| def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, chat_id, | ||
| def execute(self, model_id, system, prompt, dialogue_number, dialogue_type, history_chat_record, stream, | ||
| model_params_setting, | ||
| chat_record_id, | ||
| image, | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are several issues in this code snippet:
Optimizations and Suggestions
These changes will improve the readability and usability of the code while maintaining its functionality. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no significant irregularities or potential issues in the provided code. However, there's an additional piece of logic added to handle specific knowledge workflows (
KNOWLEDGEandKNOWLEDGE_LOOP) that modifies the execution parameters before calling the_run()method internally:This addition helps ensure compatibility with other workflow modes while setting default values appropriate for knowledge-related workflows, such as having an empty history record and enabling streaming.