We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7a66ae6 commit dcf35e0Copy full SHA for dcf35e0
packages/vertexai/src/requests/response-helpers.ts
@@ -37,7 +37,7 @@ export function createEnhancedContentResponse(
37
* This causes the `index` property to be omitted from the first candidate in the
38
* response, since it has index 0, and 0 is a default value.
39
*/
40
- if (response.candidates && !response.candidates[0].index) {
+ if (response.candidates && !response.candidates[0].hasOwnProperty('index')) {
41
response.candidates[0].index = 0;
42
}
43
0 commit comments