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

Deepseek is unable to respond due to an OpenAI timeout issue #4464

Closed
4 tasks done
sunxin0 opened this issue May 17, 2024 · 1 comment
Closed
4 tasks done

Deepseek is unable to respond due to an OpenAI timeout issue #4464

sunxin0 opened this issue May 17, 2024 · 1 comment
Labels
🐞 bug Something isn't working

Comments

@sunxin0
Copy link

sunxin0 commented May 17, 2024

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).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.3.21

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I connot find dify version in console, docker-api-1 image langgenius/dify-api:0.6.8
After configuring the deepseek API, I am unable to chat on the page.
Checking the docker logs of api-1 shows "Connection to openaipublic.blob.core.windows.net timed out."
My host has internet access restrictions; I have applied for a whitelist for api.deepseek.com, but not for OpenAI.
I can access the deepseek model via HTTP on the server, and other model vendors can be used normally.

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

Copy link

dosubot bot commented May 17, 2024

To address the timeout issue when connecting to OpenAI's servers due to network restrictions, follow these steps:

  1. Whitelist OpenAI Domains: Ensure api.openai.com is whitelisted by your network administrator to allow API access.

  2. Configure Docker for Proxy Use: If under strict network restrictions, set up your Docker containers to use a proxy by defining http_proxy and https_proxy environment variables.

  3. Secure API Key Usage: Make sure your OpenAI API key is correctly configured without hard-coding it. Use Docker secrets or environment variables for security.

  4. Adjust API Timeout and Retry Settings: Modify the timeout settings for OpenAI API calls to better handle network latency and set max_retries to deal with connectivity issues.

  5. Implement Error Handling: Use Dify's error handling for OpenAI API errors, including connection, rate limit, and authorization errors, to ensure your application's robustness.

  6. Enable Logging and Monitoring: Capture errors or timeouts related to OpenAI API calls with comprehensive logging and monitoring.

If these steps do not resolve your issue, consider contacting OpenAI support for further assistance.

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 17, 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

2 participants