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

[BUG/Help] <title>如何通过API来调用ChatGLM? #657

Open
1 task done
20130216 opened this issue Jan 24, 2024 · 0 comments
Open
1 task done

[BUG/Help] <title>如何通过API来调用ChatGLM? #657

20130216 opened this issue Jan 24, 2024 · 0 comments

Comments

@20130216
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

"model": "GLM-4.0" or "GLM-3-Turbo"
"base_url": "https://open.bigmodel.cn/api/paas/v4/chat/completions",
"api_key": "****",
"api_type": "SSE" or "json" or "open_ai"(选哪个?)

在调用glm的API时,按以上参数配置,在"api_key"准确的前提下,老是提醒:AuthenticationError: Error code: 401 - {'error': {'code': '401', 'message': '令牌已过期或验证不正确!'}}

Expected Behavior

No response

Steps To Reproduce

1.请问以上配置,有关"api_type":是不是应该指定是"open_ai"? 2.为何老师报错?("api_key"刚申请的,不会填错)

Environment

- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA Support (`python -c "import torch; print(torch.cuda.is_available())"`) :

Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant