Firebase.
  A type describing data in media formats interpretable by an AI model.
Summary
Each generative AI request or response contains a list of ModelContents, and each ModelContent value may comprise multiple heterogeneous ModelContent.Parts. 
| Constructors and Destructors | |
|---|---|
| ModelContent(params Part[] parts) | |
| ModelContent(IEnumerable< Part > parts) | |
| ModelContent(string role, params Part[] parts)Creates a  ModelContentwith the given role andParts. | |
| ModelContent(string role, IEnumerable< Part > parts)Creates a  ModelContentwith the given role andParts. | 
| Properties | |
|---|---|
| Parts | IReadOnlyList< Part >The data parts comprising this  ModelContentvalue. | 
| Role | stringThe role of the entity creating the  ModelContent. | 
| Public static functions | |
|---|---|
| FileData(string mimeType, System.Uri uri) | Creates a new  ModelContentwith the defaultuserrole, and aFileDataPartcontaining the given mimeType and data. | 
| FunctionResponse(string name, IDictionary< string, object > response, string id) | Creates a new  ModelContentwith the defaultuserrole, and aFunctionResponsePartcontaining the given name and args. | 
| InlineData(string mimeType, byte[] data) | Creates a new  ModelContentwith the defaultuserrole, and anInlineDataPartcontaining the given mimeType and data. | 
| Text(string text) | |
| Structs | |
|---|---|
| Firebase. | A part containing the result of executing code. | 
| Firebase. | A part containing code that was executed by the model. | 
| Firebase. | File data stored in Cloud Storage for Firebase, referenced by a URI. | 
| Firebase. | A predicted function call returned from the model. | 
| Firebase. | Result output from a function call. | 
| Firebase. | Data with a specified media type. | 
| Firebase. | A text part containing a string value. | 
| Interfaces | |
|---|---|
| Firebase. | A discrete piece of data in a media format interpretable by an AI model. | 
Properties
Parts
IReadOnlyList< Part > Firebase::AI::ModelContent::Parts
The data parts comprising this ModelContent value. 
Role
string Firebase::AI::ModelContent::Role
The role of the entity creating the ModelContent. 
For user-generated client requests, for example, the role is user. 
Public functions
ModelContent
Firebase::AI::ModelContent::ModelContent( params Part[] parts )
Creates a ModelContent with the given Parts, using the default user role. 
ModelContent
Firebase::AI::ModelContent::ModelContent( IEnumerable< Part > parts )
Creates a ModelContent with the given Parts, using the default user role. 
ModelContent
Firebase::AI::ModelContent::ModelContent( string role, params Part[] parts )
Creates a ModelContent with the given role and Parts. 
ModelContent
Firebase::AI::ModelContent::ModelContent( string role, IEnumerable< Part > parts )
Creates a ModelContent with the given role and Parts. 
Public static functions
FileData
ModelContent Firebase::AI::ModelContent::FileData( string mimeType, System.Uri uri )
Creates a new ModelContent with the default user role, and a FileDataPart containing the given mimeType and data. 
FunctionResponse
ModelContent Firebase::AI::ModelContent::FunctionResponse( string name, IDictionary< string, object > response, string id )
Creates a new ModelContent with the default user role, and a FunctionResponsePart containing the given name and args. 
InlineData
ModelContent Firebase::AI::ModelContent::InlineData( string mimeType, byte[] data )
Creates a new ModelContent with the default user role, and an InlineDataPart containing the given mimeType and data. 
Text
ModelContent Firebase::AI::ModelContent::Text( string text )
Creates a new ModelContent with the default user role, and a TextPart containing the given text.