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

Use Type ChatCompletionRole for ChatCompletionMessage.role #1295

Closed
wants to merge 1 commit into from

Conversation

chasleslr
Copy link

  • I understand that this repository is auto-generated and my pull request may not be merged

Changes being requested

It appears that the role attribute of ChatCompletionMessage is incorrectly using the type Literal["assistant"] instead of ChatCompletionRole. Messages sent to, and received from, the Chat Completions API can indeed accept all values defined in ChatCompletionRole, and not just "assistant".

Additional context & links

Chat Completions API documentation showing an example with messages of various roles (i.e. assistant, user, system).

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

Successfully merging this pull request may close these issues.

None yet

2 participants