Fix #692 [Bug]: Passing invalid parameters to gemini throws Undefined…
… array key "choices" /www/htdocs/vendor/openai-php/client/src/Responses/Chat/CreateResponse.php 54
Change-Id: Ibbf64cc554ef68844fd8338583f3fc8ec5fde413
What:
- [ ] Bug Fix
Description:
Related:
Fix issue #692
Yeah sure. That would make sense.
Hmm for the ErrorException type what do you thing would be best? Google returns:
[[
'error' => [
'code' => 400,
'message' => 'Invalid JSON payload received. Unknown name "ddd": Cannot find field.',
'status' => 'INVALID_ARGUMENT',
'details' => [
[
'@type' => 'type.googleapis.com/google.rpc.BadRequest',
'fieldViolations' => [
[
'description' => 'Invalid JSON payload received. Unknown name "ddd": Cannot find field.',
],
],
],
],
],
]]
type.googleapis.com/google.rpc.BadRequest would be more in line with OpenAI's type invalid_request_error, but INVALID_ARGUMENT is more informative imho.
type.googleapis.com/google.rpc.BadRequestwould be more in line with OpenAI's typeinvalid_request_error, butINVALID_ARGUMENTis more informative imho.
Probably the message/status of the higher object. I think you can ignore inner details stuff.