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

[bug ] xinference 的配置方案已经失效 ,无法被加载 #90

Open
NicoTime opened this issue May 14, 2024 · 1 comment
Open

[bug ] xinference 的配置方案已经失效 ,无法被加载 #90

NicoTime opened this issue May 14, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@NicoTime
Copy link

接入 xinference 失败。 看起来是 url 发生了变化,导致无发匹配。

image

可以看到, xinference 实际部署的时候的 url 是
image

也就是 http://localhost:9997/${modelId}
image

但是 dify 中使用的还是
http://localhost:9997/v1/models/${model_uid} 已经和最新不符合。

改进建议
考虑到两个项目不同的进展,可以考虑开放接入的 http 地址,由配置方自己设置地址。

Copy link

dosubot bot commented May 14, 2024

To address the issue with the outdated URL format for xinference integration in the dify project, making the HTTP address configurable is a practical solution. Here's a concise plan to implement this:

  1. Add Configuration Option: Introduce a new setting in the Dify interface under Settings > Model Providers > Xinference for users to input the xinference server URL. This allows for flexibility in addressing changes in the deployment environment.

  2. Backend Update: Adjust the backend to dynamically use the user-provided address for API calls to xinference, ensuring it reads from a configuration file or database.

  3. Input Validation: Implement validation for the server URL input to ensure it meets the required format, enhancing integration reliability.

  4. Documentation and Guidance: Update the documentation to guide users on configuring the server URL based on their deployment scenario, whether it's local or distributed. Include instructions for determining the machine IP address if xinference is deployed on a different machine.

  5. Fallback Mechanism: Set a default server URL, like http://127.0.0.1:9997, to ensure the system remains operational even without immediate user configuration.

By following these steps, you can make the xinference integration more adaptable to various deployment scenarios, ensuring a smoother integration process.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@dosubot dosubot bot added the bug Something isn't working label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant