-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Add Azure AI Studio as provider #7549
Add Azure AI Studio as provider #7549
Conversation
Thanks for your contribution :) Please resolve the deps conflict and add tests to the new provider accordingly. |
You are welcome :) Conflicts solved, added the tests files and update the larger icon to a better one! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few points to adjust, congratulations on your contribution, I'm sure it will help many people.
api/core/model_runtime/model_providers/azure_ai_studio/llm/llm.py
Outdated
Show resolved
Hide resolved
api/core/model_runtime/model_providers/azure_ai_studio/llm/llm.py
Outdated
Show resolved
Hide resolved
api/core/model_runtime/model_providers/azure_ai_studio/rerank/rerank.py
Outdated
Show resolved
Hide resolved
api/core/model_runtime/model_providers/azure_ai_studio/rerank/rerank.py
Outdated
Show resolved
Hide resolved
api/tests/integration_tests/model_runtime/azure_ai_studio/test_provider.py
Outdated
Show resolved
Hide resolved
api/tests/integration_tests/model_runtime/azure_ai_studio/test_llm.py
Outdated
Show resolved
Hide resolved
api/tests/integration_tests/model_runtime/azure_ai_studio/test_rerank.py
Outdated
Show resolved
Hide resolved
Good observations, mate! I ran Ruff linter in the files and added proper exception mapping. |
Co-authored-by: Hélio Lúcio <[email protected]>
Hey guys, I was doing some testing for the community and hit an error. I set up the keys correctly and everything in Azure Ai Studio. see images to see the errors! @crazywoola @takatost @laipz8200 @helioLJ |
Analyzing your deployment and mine that I used for test it (ibm-re2g-reranker-nq-3), they have different Compute Types, the one from IBM uses Managed type, while Cohere models use Consumption type, so I suspect the Authentication type are different for both. Can you send me the sample code for consumption, in Python, in that "Consume" tab, I will fix that later. Also, I'm almost pretty sure that using this inference endpoint and API Key can work with Cohere Provider Model, but not 100% sure. |
Hey @helioLJ I see the reranker you used. that is $80+ dollars per month because you are deploying an actual server with that reranker model running. The cohere endpoint is an API hosted by Microsoft and only costs $2 per 1000 queries. It seems more cost efficient and more likely to help the Dify community. Do you think its possible to support the cohere type of reranker? |
Sure! I will update to support it, would you mind message me at Discord? I'll probably need your help. 'heliolj' at Dify's server. |
Co-authored-by: Hélio Lúcio <[email protected]>
Checklist:
Important
Please review the checklist below before submitting your pull request.
dev/reformat
(backend) andcd web && npx lint-staged
(frontend) to appease the lint godsDescription
This PR adds Azure AI Studio as a new model provider in Dify. It implements support for both LLM and rerank models, allowing users to leverage Azure AI Studio's capabilities within the Dify ecosystem. This addition is particularly beneficial for organizations that exclusively use Azure and need access to models like the Cohere Reranker through Azure AI Studio Catalog.
Close #7326
Type of Change
Testing Instructions
Please test the following to verify the changes: