ChatGLM2-6B
ChatGLM2-6B copied to clipboard
[BUG/Help] <title>如何通过API来调用ChatGLM?
Is there an existing issue for this?
- [X] 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