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.
Changes proposed ✍️
What
🤖 Generated by Copilot at a1f7fb9
This pull request introduces HuggingFace as a new sentiment analysis provider for the crowd.dev platform. It adds a feature flag
NEW_SENTIMENT
to toggle between the old and new providers. It also adds theaxios
library as a dependency for thesentiment
module, which uses it to make requests to the HuggingFace service. It updates the configuration files, environment variables, and types to include the HuggingFace API key. It also modifies the tooltip component in the frontend to display the sentiment label instead of the score.
🤖 Generated by Copilot at a1f7fb9
Why
How
🤖 Generated by Copilot at a1f7fb9
CROWD_HUGGINGFACE_API_KEY
environment variable to configure the API key for the HuggingFace service, a new external provider for sentiment analysis (link, link, link)axios
dependency to the sentiment library to make HTTP requests to the HuggingFace service (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)isNewSentimentEnabled
parameter to thegetSentiment
function in the sentiment module and the data sink worker service to implement a feature flag mechanism that allows switching between the old and the new sentiment analysis providers (link, link, link, link)NEW_SENTIMENT
enum value to theFeatureFlag
enum to represent the feature flag for the new sentiment analysis provider (link)huggingfaceApiKey
property to theISentimentClientConfig
interface to store the API key for the HuggingFace service in the configuration object for the sentiment module (link)content
attribute of the tooltip component in thefrontend/src/modules/activity/components/activity-sentiment.vue
file to display the sentiment label instead of the score (link)tenantId
parameter to themergeActivityData
function in the data sink worker service to pass the tenant identifier, which will be used to check the feature flag for the new sentiment analysis provider (link, link)Checklist ✅
Feature
,Improvement
, orBug
.