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

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

Open
NoobPythoner opened this issue Dec 15, 2023 · 1 comment
Open

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

NoobPythoner opened this issue Dec 15, 2023 · 1 comment

Comments

@NoobPythoner
Copy link

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
Copy link
Collaborator

ruixie commented Feb 26, 2024

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

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

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

2 participants