WisdomShell / codeshell

A series of code large language models developed by PKU-KCL
http://se.pku.edu.cn/kcl
Other
1.62k stars 120 forks source link

openai_api.py报错,model.generation_config无法赋值 #64

Open NoobPythoner opened 11 months ago

NoobPythoner commented 11 months ago

File "/home/opensource_LLM/codeshell/demos/openai_api.py", line 251, in create_chat_completion generation_config['temperature'] = request.temperature


TypeError: 'GenerationConfig' object does not support item assignment
ruixie commented 8 months ago

不好意思,我们在测试的时候确实没测试到这个功能,bug已经修复,将generation_config['temperature']改为generation_config.temperature即可。

https://github.com/WisdomShell/codeshell/blob/bda0ba55cc0b46f3e8a7a52dae96fd2bfcb90aac/demos/openai_api.py#L249C32-L249C43