-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Description
Confirm this is an issue with the Python library and not an underlying OpenAI API
- This is an issue with the Python library
Describe the bug
I notice that about 2 weeks ago vllm has merged pr about adding an argument repetition_penalty
aligned with huggingface. (refer to pr 1424)
However, openai-python also graded to v1 several days ago. it refuses the unknown argument repetition_penalty. The following is the detail error.
xxx/examples/openai_chatcompletion_client.py", line 72, in <module> chat_completion = client.chat.completions.create( File "/opt/conda/lib/python3.10/site-packages/openai/_utils/_utils.py", line 299, in wrapper return func(*args, **kwargs) TypeError: Completions.create() got an unexpected keyword argument 'repetition_penalty'
This conflict makes that we can not depend openai library for open-source models and self-defined arguments (much more than repetition_penalty). This library has been factually used in many API-based model deployment library like fastchat and vllm.
I really hope that the required_args
can be removed. At least, we can modify its behaviors without modifying the source code of openai-python.
To Reproduce
- git clone vllm and setup it.
- Make some request using vllm and openai, add arguments
repetition_penalty
- The error happens.
Code snippets
No response
OS
Linux
Python version
Python v3.10
Library version
openai v1.2.2