Firebase. AI. ModelContent
A type describing data in media formats interpretable by an AI model.
Summary
Each generative AI request or response contains a list of ModelContent
s, and each ModelContent
value may comprise multiple heterogeneous ModelContent.Part
s.
Constructors and Destructors | |
---|---|
ModelContent(params Part[] parts) | |
ModelContent(IEnumerable< Part > parts) | |
ModelContent(string role, params Part[] parts) Creates a ModelContent with the given role and Part s. | |
ModelContent(string role, IEnumerable< Part > parts) Creates a ModelContent with the given role and Part s. |
Properties | |
---|---|
Parts | IEnumerable< Part > The data parts comprising this ModelContent value. |
Role | string The role of the entity creating the ModelContent . |
Public static functions | |
---|---|
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(string name, IDictionary< string, object > response) | Creates a new ModelContent with the default user role, and a FunctionResponsePart containing the given name and args. |
InlineData(string mimeType, byte[] data) | Creates a new ModelContent with the default user role, and an InlineDataPart containing the given mimeType and data. |
Text(string text) |
Structs | |
---|---|
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
IEnumerable< 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 Part
s, using the default user
role.
ModelContent
Firebase::AI::ModelContent::ModelContent( IEnumerable< Part > parts )
Creates a ModelContent
with the given Part
s, using the default user
role.
ModelContent
Firebase::AI::ModelContent::ModelContent( string role, params Part[] parts )
Creates a ModelContent
with the given role and Part
s.
ModelContent
Firebase::AI::ModelContent::ModelContent( string role, IEnumerable< Part > parts )
Creates a ModelContent
with the given role and Part
s.
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 )
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.