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

API rejects multiple role: "user" messages in a row #209

Open
ianb opened this issue Dec 31, 2023 · 0 comments
Open

API rejects multiple role: "user" messages in a row #209

ianb opened this issue Dec 31, 2023 · 0 comments
Labels
component:support How to do xyz? type:bug Something isn't working

Comments

@ianb
Copy link

ianb commented Dec 31, 2023

Description of the bug:

If you submit a prompt like this to Gemini Pro:

{
  contents: [
    { role: "user", ...}
    { role: "user", ....}
  ]
}

The API will respond that the last message must come from user.

This occurred when I was translating my GPT role: "system" messages to be role: "user". (But GPT also doesn't reject multiple user messages in a row)

Actual vs expected behavior:

  1. The error message should be accurate
  2. The API shouldn't reject two user messages in a row

Any other information you'd like to share?

No response

@ianb ianb added the type:bug Something isn't working label Dec 31, 2023
@keertk keertk added the component:support How to do xyz? label Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:support How to do xyz? type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants