WisdomShell / codeshell

A series of code large language models developed by PKU-KCL

Home Page:http://se.pku.edu.cn/kcl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

NoobPythoner opened this issue · comments

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

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

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