[BUG]json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0).
from openai import OpenAI client = OpenAI(api_key="", base_url="https://api.deepseek.com") response = client.chat.completions.create( model="deepseek-reasoner", messages=[ {"role": "system", "content": "You are a helpful assistant"}, {"role": "user", "content": "1+1=?"}, ], temperature=0 ) print(response) print(response.choices[0].message) print(response.choices[0].message.content) When I use the official code to call the API, I get: json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0). Why is this? It works when I first use the code, but it only works once and then it stops working. Can anyone solve this?
I also encounter the same error when using model deepseek-chat.
Python Dependency:
openai==1.58.0
+1
Python Dependency:openai==1.64.0
+1 Python Dependency: openai==1.65.1
If you don't mind, I'm gonna take this issue and open PR until this weekend(KST).
I am currently investigating this issue and need more time to figure it out. If anyone can resolve this issue right away, please let me know. Otherwise, I will continue working on it.
I am currently investigating this issue and need more time to figure it out. If anyone can resolve this issue right away, please let me know. Otherwise, I will continue working on it.
Based on my experience, it is a on and off issue. I suspect it has more to do with DeepSeek's server than our code.
Based on my experience, it is a on and off issue. I suspect it has more to do with DeepSeek's server than our code.
Oh, for real? If then I think this issue should be handled by Deepseek's engineers. Thanks for your comment. I am going to look for other issue that I can handle by myself.
For now, I suspect openai library. I think there might be an issue on a synchronous API requests.
I think it should be a problem on the server side. Using the same program, there is no problem calling the chatgpt API, but this error occurs when calling the deepseek API
I think it should be a problem on the server side. Using the same program, there is no problem calling the chatgpt API, but this error occurs when calling the deepseek API
I see. Thanks. I hope our engineers would handle this issue for us 🙏
+1 Python Dependency: openai==1.65.4 And I agree that it's more like an issue caused by high using demands. It works so well and smoothly during midnight (discount periods) but reports this problem everytime after 8:30 am CST in the past week.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this issue is still relevant, please leave a comment to keep it open. Thank you for your contributions!
false