feat(GenAI): only include Slack user messages in historical context #5296
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to the
dispatch_slack
plugin, focusing on improving the generative AI signal analysis message creation and code organization. The most important changes include adding a new configuration parameter for Slack conversations, refining the historical context generation, and improving code readability by reordering imports.Enhancements to Generative AI Signal Analysis:
src/dispatch/plugins/dispatch_slack/case/messages.py
: AddedSlackConversationConfiguration
as a parameter to thecreate_genai_signal_analysis_message
function and updated the function to use this configuration when including Slack messages from users. [1] [2] [3]src/dispatch/plugins/dispatch_slack/case/messages.py
: Refined the historical context generation by adding more detailed tags for case resolution and resolution reason.Code Organization:
src/dispatch/plugins/dispatch_slack/case/messages.py
: Reordered imports for better readability and maintainability.src/dispatch/plugins/dispatch_slack/service.py
: Reordered imports and added missing type annotations to improve code clarity.Additional Changes:
src/dispatch/plugins/dispatch_slack/plugin.py
: Passed the newSlackConversationConfiguration
parameter to thecreate_threaded
function.src/dispatch/signal/flows.py
: Reordered imports for better readability. [1] [2] [3]