FirebaseAILogic Framework Reference Stay organized with collections Save and categorize content based on your preferences.
Part
@available(iOS15.0,macOS12.0,tvOS15.0,watchOS8.0,*)publicprotocolPart:PartsRepresentable,Decodable,Encodable,Equatable,SendableA discrete piece of data in a media format interpretable by an AI model.
Within a single value ofPart, different data types may not mix.
Indicates whether this
Partis a summary of the model’s internal thinking process.When
includeThoughtsis set totrueinThinkingConfig, the model may return one ormore “thought” parts that provide insight into how it reasoned through the prompt to arriveat the final answer. These parts will haveisThoughtset totrue.Declaration
Swift
varisThought:Bool{get}Extension methodpartsValue
Undocumented
Declaration
Swift
varpartsValue:[anyPart]{get}
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-28 UTC.