Returns the text string from the response, if available. Throws if the prompt or candidate was blocked.
Signature:
text:()=>string;
EnhancedGenerateContentResponse.thoughtSummary
Aggregates and returns every TextPart with their thought property set to true from the first candidate of GenerateContentResponse.
Thought summaries provide a brief overview of the model's internal thinking process, offering insight into how it arrived at the final answer. This can be useful for debugging, understanding the model's reasoning, and verifying its accuracy.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 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\n| Property | Type | Description |\n|-----------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [functionCalls](./ai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsefunctioncalls) | () =\\\u003e [FunctionCall](./ai.functioncall.md#functioncall_interface)\\[\\] \\| undefined | Aggregates and returns every [FunctionCall](./ai.functioncall.md#functioncall_interface) from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface). |\n| [inlineDataParts](./ai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponseinlinedataparts) | () =\\\u003e [InlineDataPart](./ai.inlinedatapart.md#inlinedatapart_interface)\\[\\] \\| undefined | Aggregates and returns every [InlineDataPart](./ai.inlinedatapart.md#inlinedatapart_interface) from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface). |\n| [text](./ai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsetext) | () =\\\u003e string | Returns the text string from the response, if available. Throws if the prompt or candidate was blocked. |\n| [thoughtSummary](./ai.enhancedgeneratecontentresponse.md#enhancedgeneratecontentresponsethoughtsummary) | () =\\\u003e string \\| undefined | Aggregates and returns every [TextPart](./ai.textpart.md#textpart_interface) with their `thought` property set to `true` from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface). |\n\nEnhancedGenerateContentResponse.functionCalls\n\nAggregates and returns every [FunctionCall](./ai.functioncall.md#functioncall_interface) from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface).\n\n**Signature:** \n\n functionCalls: () =\u003e FunctionCall[] | undefined;\n\nEnhancedGenerateContentResponse.inlineDataParts\n\nAggregates and returns every [InlineDataPart](./ai.inlinedatapart.md#inlinedatapart_interface) from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface).\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;\n\nEnhancedGenerateContentResponse.thoughtSummary\n\nAggregates and returns every [TextPart](./ai.textpart.md#textpart_interface) with their `thought` property set to `true` from the first candidate of [GenerateContentResponse](./ai.generatecontentresponse.md#generatecontentresponse_interface).\n\nThought summaries provide a brief overview of the model's internal thinking process, offering insight into how it arrived at the final answer. This can be useful for debugging, understanding the model's reasoning, and verifying its accuracy.\n\nThoughts will only be included if [ThinkingConfig.includeThoughts](./ai.thinkingconfig.md#thinkingconfigincludethoughts) is set to `true`.\n\n**Signature:** \n\n thoughtSummary: () =\u003e string | undefined;"]]