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

Omit redundant information in chat completion message params #1438

Closed
1 task done
dgk675 opened this issue May 23, 2024 · 1 comment
Closed
1 task done

Omit redundant information in chat completion message params #1438

dgk675 opened this issue May 23, 2024 · 1 comment

Comments

@dgk675
Copy link

dgk675 commented May 23, 2024

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

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.

@rattrayalex rattrayalex closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
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