Closed jamesliu668 closed 8 months ago
🤖
你好,@jamesliu668!我是Dosu,一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在等待人类维护者的同时,我在这里帮助你。我将马上查看你的问题,并很快给你一个完整的答复。
版本写错了,我现在用的是最新版本,0.5.5
🤖
Based on the error message you're encountering, it seems like a network issue rather than a problem with the Dify code or your API and Secret keys. This error typically occurs when your system is unable to resolve the domain name to an IP address, which is necessary to establish a network connection.
Here are a few steps you can take to resolve this issue:
Check your internet connection: Ensure that your system has a stable internet connection.
DNS Server: Check if your DNS server is working correctly. You can try to change your DNS server to a public one like Google's (8.8.8.8 and 8.8.4.4) or Cloudflare's (1.1.1.1).
Firewall/Security Groups: Ensure that your firewall or security group rules are not blocking outbound connections.
Proxy: If you're behind a proxy, make sure it's configured correctly.
Hosts File: Check your hosts file (located at /etc/hosts on Unix systems and C:\Windows\System32\drivers\etc\hosts on Windows) to ensure there are no incorrect entries.
If the problem persists after trying these steps, it might be a temporary issue with Baidu's servers. In this case, you might want to try again later or contact Baidu's support for further assistance.
As for how Dify handles network connections, specifically when interacting with the Baidu API, I wasn't able to find specific information within the repository. However, the file wenxin.tsx might provide some insights into how Dify interacts with the Wenxin Yiyuan API.
Please note that a similar issue was reported in the Dify repository: Get errors" Temporary failure in name resolution" when configuring API keys for some model providers. The suggested solution in that case was to configure DNS in /etc/docker/daemon.json
to ensure proper DNS resolution within the Docker container. You might want to try this solution if the steps above do not resolve your issue.
I hope this helps! If you have any other questions or need further clarification, feel free to ask.
Close due to https://github.com/langgenius/dify/issues/1542
How to configure and test a proxy?
Self Checks
Dify version
0.3.21
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
在模型供应商页面设置文心一言的api key和Secret Key报错。
✔️ Expected Behavior
设置正确
❌ Actual Behavior
返回错误信息如下: Credentials validation failed: Failed to get access token from Baidu: HTTPSConnectionPool(host='aip.baidubce.com', port=443): Max retries exceeded with url: /oauth/2.0/token?grant_type=client_credentials&client_id={MY-api-key}&client_secret={my secret key} (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f8e635bfd30>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))