feat(genai): elevates GenAI feature to its own service library #5416
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.
Summary of Code Changes
New Files Added
exceptions.py
:GenAIException
that inherits fromDispatchException
.service.py
:generate_case_signal_historical_context
to create historical context for a case.generate_case_signal_summary
to generate an analysis summary using an AI plugin.Modifications in Existing Files
messages.py
:SlackApiError
andWebClient
from Slack SDK.create_genai_signal_analysis_message
function by removing direct Slack API calls and using the AI service for generating summaries.plugin.py
:get_conversation_replies
to fetch replies from a specific thread in a Slack conversation.SlackConversationPlugin
to use the new AI service for generating GenAI signal analysis messages.These changes introduce a new exception handling mechanism and enhance the AI-driven analysis capabilities by integrating a new service module. The Slack integration has been refactored to utilize these new services, simplifying the code and improving maintainability.