EnhancedGenerateContentResponse interface
Stay organized with collections
Save and categorize content based on your preferences.
Response object wrapped with helper methods.
Signature:
export interface EnhancedGenerateContentResponse extends GenerateContentResponse
Extends: GenerateContentResponse
Properties
EnhancedGenerateContentResponse.functionCalls
Signature:
functionCalls: () => FunctionCall[] | undefined;
EnhancedGenerateContentResponse.inlineDataParts
Aggregates and returns all InlineDataParts from the GenerateContentResponse's first candidate.
Signature:
inlineDataParts: () => InlineDataPart[] | undefined;
EnhancedGenerateContentResponse.text
Returns the text string from the response, if available. Throws if the prompt or candidate was blocked.
Signature:
text: () => string;
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-20 UTC.
[null,null,["Last updated 2025-05-20 UTC."],[],[],null,["Response object wrapped with helper methods.\n\n**Signature:** \n\n export interface EnhancedGenerateContentResponse extends GenerateContentResponse \n\n**Extends:** [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface)\n\nProperties\n\nEnhancedGenerateContentResponse.functionCalls\n\n**Signature:** \n\n functionCalls: () =\u003e FunctionCall[] | undefined;\n\nEnhancedGenerateContentResponse.inlineDataParts\n\nAggregates and returns all [InlineDataPart](./ai.inlinedatapart.md#inlinedatapart_interface)s from the [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface)'s first candidate.\n\n**Signature:** \n\n inlineDataParts: () =\u003e InlineDataPart[] | undefined;\n\nEnhancedGenerateContentResponse.text\n\nReturns the text string from the response, if available. Throws if the prompt or candidate was blocked.\n\n**Signature:** \n\n text: () =\u003e string;"]]