Omit redundant information in chat completion message params
dgk675 opened this issue · 1 comments
dgk675 commented
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
- This is a feature request for the Python library
Describe the feature or improvement you're requesting
Currently, classes like ChatCompletionSystemMessageParam
require a parameter of type Required[Literal['system']].
The class name already contains this required role, so this param is simply redundant information while not allowing any different values.
Suggestion: This parameter should be made optional with the required literal as default value for backwards compatibility or even completely omitted.
Additional context
No response
rattrayalex commented
Thanks for the suggestion. This wouldn't work when people provide raw dictionaries, like {'role': 'system', …}
, but we do have related ideas to make this more convenient. Stay tuned.