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

After upgrading, the local deployment model cannot be used in the intranet environment #12471

Closed
5 tasks done
opsvr202 opened this issue Jan 8, 2025 · 3 comments · Fixed by #12478
Closed
5 tasks done
Assignees
Labels
🐞 bug Something isn't working

Comments

@opsvr202
Copy link

opsvr202 commented Jan 8, 2025

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • 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.

Dify version

0.15.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Environment description: privatization deployment of dify, v0.15.0 version, dify docking with xinference's inference embedding and rerank model
Question 1: The knowledge base embedding cannot use local embedding and rerank models. The screenshot of the problem is as follows
cb4c11f26fd2e5a48e06856c45fff93
16c6ec1fc2e059fecfee805c4af1969
cf53b479cdcdad1f4c8e6da6b1f610b
6a3a8aad7af12d2213ac271210698eb
4f93f4d6bc1e8ae6bc7f292a9f885c2
05a41a7ba0445c6d563679f44f9b57e
2ab687517abec1e8652cad1783998ac

Question 2: The question-and-answer feature cannot utilize the local model: The screenshot of the issue is provided below:
d4b5fbdb26524ef752f515c0d0a34f6
1b61643ac064d39fe7abf00382d2100
fce27a82fc0a30ef32053fdc12e77be

✔️ Expected Behavior

Call the xinference model for question answering and embedding

❌ Actual Behavior

Unable to call xinference model for question answering and embedding

@dosubot dosubot bot added the 🐞 bug Something isn't working label Jan 8, 2025
Copy link

dosubot bot commented Jan 8, 2025

I found some similar discussions that might be relevant to your issue:

  1. Error: Response output is missing or does not contain embeddings - This discussion is unsolved and might provide insights into similar embedding issues [1].

  2. Xinference failed to access the local model - This is another unsolved discussion that deals with accessing local models, which might be related to your problem [2].

For your specific issue, the DNS resolution errors you're encountering suggest that the Dify deployment might be having trouble resolving external domains. Here are some common causes and solutions for connection errors when using local models in Dify:

  • Cross-Domain Issues: Ensure that the CORS configuration in docker-compose.yml allows the necessary domains.
  • Incorrect Server Address: Use the host's local network IP address instead of 127.0.0.1 for server addresses.
  • Port Conflicts: Check for port conflicts and adjust the port mapping in docker-compose.yaml if necessary.
  • Nginx Configuration Errors: Verify that Nginx is forwarding requests to the correct service location.
  • SSRF Proxy Configuration: Ensure SSRF_PROXY and HTTP_PROXY environment variables are correctly set to prevent SSRF attacks [3].

These steps should help you troubleshoot and resolve the connection issues with your local models in the intranet environment.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@laipz8200
Copy link
Member

Thank you for the detailed logs. I've updated the code to use gpt2tokenizer as a fallback if tiktoken cannot be loaded.

@opsvr202
Copy link
Author

opsvr202 commented Jan 8, 2025

感谢您提供详细的日志。我已更新代码,如果无法加载 tiktoken,则使用 gpt2tokenizer 作为后备。

谢谢,期待

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

Successfully merging a pull request may close this issue.

2 participants