Closed aiqinxuancai closed 9 months ago
I think its due to Service Unavailable (HTTP Code 500) issue.
I fixed the error message. Please try again with version 0.1.12
I think its due to Service Unavailable (HTTP Code 500) issue.
I fixed the error message. Please try again with version 0.1.12
Thank you, I have seen the specific reason for the output. It seems that API access is restricted by region.
{
"error": {
"code": 400,
"message": "User location is not supported for the API use.",
"status": "FAILED_PRECONDITION"
}
}
Can you try to change the APIs version to v1 instead of v1beta?
var model = new GenerativeModel(apiKey){ Version = "v1" }
Version v1 doesn't support function calling.
Version:0.1.9 I can use this key in local curl and it works fine. It is difficult to determine the specific cause of the error based on the information provided in the exception.