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的API还是会报错哎 #696

Open
4 tasks done
yifeigit opened this issue Feb 26, 2025 · 6 comments
Open
4 tasks done

deepseek的API还是会报错哎 #696

yifeigit opened this issue Feb 26, 2025 · 6 comments
Labels
bug Something isn't working

Comments

@yifeigit
Copy link

Before you asking

  • I have searched the existing issues
  • I spend at least 5 minutes for thinking and preparing
  • I have thoroughly and completely read the wiki.
  • I have carefully checked the issue, and it is unrelated to the network environment.

Environment

- OS:
- Python:
- pdf2zh:ERROR:pdf2zh.converter:Error code: 401 - {'error': {'message': 'Authentication Fails (no such user)', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}

Describe the bug

deepseek开放API充值了,但是发现现在使用deepseek的API会报错:Error code: 401 - {'error': {'message': 'Authentication Fails (no such user)', 'type': 'authentication_error', 'param': None, 'code': 'invalid_request_error'}}

To Reproduce

  1. execute '...'
  2. select '....'
  3. see errors

Expected behavior

No response

Relevant log output


Origin PDF file

No response

Anything else?

No response

@yifeigit yifeigit added the bug Something isn't working label Feb 26, 2025
@hellofinch
Copy link
Contributor

Authentication Fails (no such user)
确认一下deepseek你真的能访问吗?这里提示可是没有该用户呀?

@yifeigit
Copy link
Author

yifeigit commented Feb 27, 2025 via email

@ProgrammerZXG
Copy link

我一开始使用deepseek也有问题,然后pip install --upgrade pdf2zh之后就可以了。
然后你可以试试用这里的调用对话API看看能不能正确输出(https://api-docs.deepseek.com/zh-cn/):

# Please install OpenAI SDK first: pip3 install openai`

from openai import OpenAI

client = OpenAI(api_key="", base_url="https://api.deepseek.com")

response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello"},
],
stream=False
)

print(response.choices[0].message.content)`

如果是正常的话就会输出:
Hello! How can I assist you today? 😊

@ProgrammerZXG
Copy link

不过感觉目前deepseek的API还是很慢,可能用的人太多了

@Rukkha1024
Copy link

아마도 서버 문제일겁니다

@ProgrammerZXG
Copy link

아마도 서버 문제일겁니다

네, 그럴 것 같습니다.

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

4 participants