When I send the following request to Gemini 1.5 Flash, it works as expected:
{
"contents": [
{
"role": "user",
"parts": [
{
"inline_data": {
"mime_type": "audio/wav",
"data": "base64_encoded_audio_data"
}
}
]
}
]
}
When I send the same data to Gemini 2.0 Flash (exp), it fails:
{
"clientContent": {
"turns": [
{
"parts": [
{
"inline_data": {
"mime_type": "audio/wav",
"data": "base64_encoded_audio_data"
}
}
],
"role": "user"
}
]
}
}
With the error:
Request trace id: 40b236fcefc20b16, [ORIGINAL ERROR] generic::invalid_argument: Unsupported content part type:3; Error rais
Is there something wrong with the format of my request?
I’m able to send text to Gemini 2.0 Flash (exp) via this format:
{
"clientContent": {
"turns": [
{
"parts": [
{
"text": "Hello world!"
}
],
"role": "user"
}
]
}
}
I just can’t seem to get audio to also work via BidiGenerateContentClientContent
.