-
Notifications
You must be signed in to change notification settings - Fork 15k
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] Frequent JSONDecodeError with DeepSeek API #599
Comments
我在调用api的时候也遇到了这个问题,应该是服务本身的问题,合理猜测服务器负载太高了 |
For API-related performance updates, please visit: https://status.deepseek.com/ |
你好,问题解决了吗,我现在运行还是这个结果。示例代码有时能运行有时会报以上这个错误,自己写的代码则是从来没有成功过 |
same here, it just happens randomly every now and then, I just added retry logic to go through, but it's quite unpredictable at the moment. the Status says everything is up and running correctly, while it isn't really. |
没解决,我这边的情况和你说的简直一模一样 |
Exactly, I was misled into thinking it was some json formatting issues with my own code and wasted 2 days debugging it |
I am pretty sure that there are some gateways in DeepSeek's backend servers have a timeout of 60s . For a request that takes more than 60s , for example, too many tokens to generate, will hit the timeout limit and return with empty content.
I think deepseek should increase this timeout to, for example 120s, to reduce the chance of such error. By the way, add the following prompt can alleviate the issue to some extent. Like solving 90% of the failure cases in my test. Provide your final answer in a concise manner without showing any internal reasoning or chain-of-thought. Only output the final result. |
目前还是这样,api不稳定,我和楼主的错误是一样的……不是一直出错,一阵OK 同样的代码 就报错了,所以显然是服务的问题。希望官网能早日解决 |
Same here. It is a consistent pattern when using R1/Reasoner - whether through the web browser chat, the Python/OpenAI API, or direct HTTP requests. The first call works fine, but after that, it stops functioning for an extended period. |
我也是 应该就是服务器的问题 太不稳定了 |
"raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)"
This problem frequently occurs when I use the deepseek-API and has been going on for several days. Even the deepseek sample request (shown below) has this error frequently.
The text was updated successfully, but these errors were encountered: