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

Enable Use of Cohere's Rerank Model from Azure AI Studio in #9780

Open
4 of 5 tasks
grapswiz opened this issue Oct 24, 2024 · 5 comments
Open
4 of 5 tasks

Enable Use of Cohere's Rerank Model from Azure AI Studio in #9780

grapswiz opened this issue Oct 24, 2024 · 5 comments
Labels
💪 enhancement New feature or request stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@grapswiz
Copy link

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

Yes, I tried to use Cohere's Rerank model from Azure AI Studio for reranking search results, but Dify does not support this model, so I was unable to use it. Since we operate all of our resources on Azure, not being able to use this feature affects our operational efficiency. Enabling the Rerank model would allow us to centralize resource management on Azure, providing significant benefits in terms of security and cost management.

2. Additional context or comments

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
@dosubot dosubot bot added the 💪 enhancement New feature or request label Oct 24, 2024
@rudnypc
Copy link

rudnypc commented Oct 26, 2024

I'm having the same problem

@Zqsng6Zw
Copy link

There are several points in api/core/model_runtime/model_providers/azure_ai_studio/rerank/rerank.py that are not in line with the actual situation.

  1. in _azure_rerank(), you need to pass "query” and “documents” keys for body, not "inputs" and "docs".
  2. in _invoke(), the expected result format is different from the actual one and needs to be corrected.
  3. What I entered as a JWT Token is being used as just an API key, but it is working correctly.

I'm not sure if this is the right way to handle the problem, though it seems to be working for the time being in my environment.

@nickjfrench
Copy link

Second this request. Not just Cohere, but enable APIs from any third-party model deployed in Azure AI Studio.

@trantuthien
Copy link

I'm having the same problem too. Can not use Re-rank model

Copy link

dosubot bot commented Dec 20, 2024

Hi, @grapswiz. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • Original request for support of Cohere's Rerank model from Azure AI Studio in Dify.
  • Multiple users, including rudnypc and trantuthien, reported similar issues.
  • Zqsng6Zw suggested code changes to _azure_rerank() and _invoke() functions, noting JWT Token usage as a workaround.
  • Nickjfrench proposed broader API support for third-party models in Azure AI Studio.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the Dify repository by commenting here.
  • If there is no further activity, the issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

5 participants