THUDM / ChatGLM2-6B

ChatGLM2-6B: An Open Bilingual Chat LLM | 开源双语对话语言模型
Other
15.68k stars 1.85k forks source link

[BUG/Help] <title>流式API部署 #577

Open Hannieliao opened 11 months ago

Hannieliao commented 11 months ago

Is there an existing issue for this?

Current Behavior

1、请问部署流式api,出现报错: 2、如何获取类似与GPT4的openai.api_key呢,如果在其他模型中需要使用openai.api_key,直接填"none"吗

Expected Behavior

No response

Steps To Reproduce

运行openai_api.py 出现报错: File "./user/anaconda3/envs/WavJourney/lib/python3.8/site-packages/openai/api_requestor.py", line 763, in _interpret_response_line raise self.handle_error_response( openai.error.AuthenticationError: Incorrect API key provided: none. You can find your API key at https://platform.openai.com/account/api-keys

Environment

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

Anything else?

No response

hxujal commented 11 months ago

我也想问,好像提供的openai_api.py不支持流式输出调用,希望官方人员参考一下qwen中的openai_api.py https://github.com/QwenLM/Qwen/blob/main/openai_api.py