Open jelni opened 8 months ago
I have the same issue. Any updates?
@xslingcn you could use the streamGenerateContent
endpoint and concatenate all returned parts (excluding the last one, which seems to be affected by the issue i described)
I also have the same issue. This makes the query from API very unstable, frequently resulting in null response. :(
same here. My response is: { "candidates": [ { "finishReason": "OTHER", "index": 0 } ], "usageMetadata": { "promptTokenCount": 171, "totalTokenCount": 171 } }
Description of the bug:
when the
Candidate.finishReason
response field is not set toSTOP
, theCandidate.content
is missing.example reproduction
Actual vs expected behavior:
the response to this request is currently
the
candidates[0].content
field is expected to contain the first generated token (asmaxOutputTokens
was set to1
), but is missingAny other information you'd like to share?
this started happening between 2024-01-12 and 2024-01-14 on the
v1beta
API version