I am experiencing the following:
Method | Model | Outcome |
generateContent | gemini-1.5-flash | Returns expected response |
generateContent | gemini-pro | Returns expected response |
streamGenerateContent | gemini-1.5-flash | See below |
streamGenerateContent | gemini-pro | Returns expected responses |
Specifically for streamGenerateContent with gemini-1.5-flash, using the following:
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:streamGenerateContent?key=api_key_here" \
-H 'Content-Type: application/json' -X POST -d '{"contents":[{"parts":[{"text": "Test"}]}]}'
The response is:
{
"error": {
"code": 400,
"message": "Invalid resource field value in the request.",
"status": "INVALID_ARGUMENT",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "RESOURCE_PROJECT_INVALID",
"domain": "googleapis.com",
"metadata": {
"method": "google.cloud.aiplatform.internal.PredictionService.StreamGenerateContent",
"service": "aiplatform.googleapis.com"
}
}
]
}
}
Changing the model or the method within the command gets correct results again.
Any idea what could be the issue here?
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |