Skip to content
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

New sentiment #1839

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

New sentiment #1839

wants to merge 7 commits into from

Conversation

joanreyero
Copy link
Contributor

@joanreyero joanreyero commented Nov 13, 2023

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 the axios library as a dependency for the sentiment 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

Oh we're the crew of the data sink
And we work with sentiment
We've got a new provider to try
It's called HuggingFace we bet

Why

How

🤖 Generated by Copilot at a1f7fb9

  • Add 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)
  • Add 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)
  • Add isNewSentimentEnabled parameter to the getSentiment 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)
  • Add NEW_SENTIMENT enum value to the FeatureFlag enum to represent the feature flag for the new sentiment analysis provider (link)
  • Add huggingfaceApiKey property to the ISentimentClientConfig interface to store the API key for the HuggingFace service in the configuration object for the sentiment module (link)
  • Modify the content attribute of the tooltip component in the frontend/src/modules/activity/components/activity-sentiment.vue file to display the sentiment label instead of the score (link)
  • Add tenantId parameter to the mergeActivityData 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 ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screenshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

@joanreyero joanreyero added the Improvement Created by Linear-GitHub Sync label Nov 13, 2023
@joanreyero joanreyero changed the title Improvement/new sentiment New sentiment Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Created by Linear-GitHub Sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants