-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: AI dialogue nodes support historical chat history parameters #4245
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 |
|---|---|---|
|
|
@@ -125,6 +125,7 @@ export default { | |
| }, | ||
| defaultPrompt: 'Known Information', | ||
| think: 'Thinking Process', | ||
| historyMessage: 'Historical chat records', | ||
| }, | ||
| searchKnowledgeNode: { | ||
| label: 'Knowledge Retrieval', | ||
|
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. The given code snippet looks mostly clean and well-structured. However, there are a few minor improvements and suggestions:
Here's the revised version: @@ -125,6 +125,8 @@
},
defaultPrompt: 'Known Information',
think: 'Thinking Process',
historyMessage: 'Historical Chat Records',
};
export default { ...searchKnowledgeNode }; // Keep consistent capitalization here if necessary (e.g., SearchKnowledgeNode instead)This version maintains the original logic while making some minor adjustments to improve clarity and adherence to coding standards. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,6 +82,10 @@ export const aiChatNode = { | |
| label: t('views.applicationWorkflow.nodes.aiChatNode.think'), | ||
| value: 'reasoning_content', | ||
| }, | ||
| { | ||
| label: t('views.applicationWorkflow.nodes.aiChatNode.historyMessage'), | ||
| value: 'history_message', | ||
| }, | ||
| ], | ||
| }, | ||
| }, | ||
|
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. The code snippet provided looks fairly consistent and doesn't contain any apparent errors or issues relevant to its intended functionality. However, there are a few areas that could be improved:
Overall, the code appears clean and functional; minor adjustments related to consistency and performance would enhance reliability and usability without altering the core logic. |
||
|
|
||
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.
The provided code appears to be intended to handle natural language conversations using LLMs with possibly integrated additional functionality like MCQ processing. Here are some observations, potential issues, and suggestions for improvement:
Potential Issues:
_) in variable names is common practice but should be clear about what these variables represent.executeseems to have duplicated handling logic between stream and non-stream cases, which could be consolidated.Optimization Suggestions:
_handle_mcp_requestto make sure they cover all expected scenarios.Here's a slightly refined version of the code with improved documentation and structure:
Key Improvements:
write_context_streamandwrite_context) to improve reusability.