classifai icon indicating copy to clipboard operation
classifai copied to clipboard

[WIP] Create Azure/Language provider and connect it to LP Service

Open cadic opened this issue 2 years ago • 6 comments

Description of the Change

Adds Azure/Language provider within LanguageProcessing service

The API keys screen is in Classifai > Language Processing > Microsoft Azure.

The provider will have 2 types of requests:

  1. Sync request returns the result immediately in run time. Used for Key Phrase Extraction
  2. Async request sets up the job, which results to be requested later. Will be used for Abstractive Summarization

The API version is currently 2022-10-01-preview.

The Abstractive Summarization feature is not available publicly and needs to be applied for before we proceed with it.

Closes #159

How to test the Change

Credits

Props @username, @username2, ...

Checklist:

  • [ ] I agree to follow this project's Code of Conduct.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my change.
  • [ ] All new and existing tests pass.

cadic avatar Feb 27 '23 09:02 cadic

@cadic might be good to possibly build off the work @dkotter has in his OpenAI/ChatGPT PR to add this functionality and focus more on ensuring someone can select either OpenAI or Azure for this feature.

jeffpaul avatar Mar 09 '23 21:03 jeffpaul

FYI that I would still like to see this get out of WIP as this would be a good UX experiment for how we handle the same functionality within the plugin via two different service providers. I might be more pressed to handle this when we have a specific request to have a different service provider for this functionality, it may be best to leave as WIP for now.

In discussion with @dkotter, it may also be better holding on this PR until Azure brings this feature out of beta preview into general public availability.

jeffpaul avatar Mar 20 '23 19:03 jeffpaul

@Sidsector9 this might be a good PR to pick up (or perhaps close and open a subsequent related one) to use as an example of adding a new service provider with the v3 release; thoughts?

jeffpaul avatar Jan 02 '24 17:01 jeffpaul

Since we're adding this to core, it would be a good example for internal developers only. Third-party devs will still need to use hooks that will ship out with v3.

Sidsector9 avatar Jan 03 '24 07:01 Sidsector9

@Sidsector9 sorry, I had intended for this to be built post-v3 stabilizing in develop (or even released) so that the PR here (or one like it if we want to start anew) could be an example of how to extend ClassifAI post-v3's hooks being available.

jeffpaul avatar Jan 04 '24 22:01 jeffpaul

@cadic thanks for the PR! Could you please rebase your PR on top of the latest changes in the base branch?

github-actions[bot] avatar Feb 05 '24 16:02 github-actions[bot]