Firebase.AI.GenerateObjectResponse< T >

The model's response to a generate object request.

Summary

The object is deserialized using reflection. If you would like to implement your own deserialization method, have your class T implement the IFirebaseDeserializable interface.

Details
Template Parameters
T
The type of the underlying Result

Properties

Response
The underlying GenerateContentResponse returned from the Model.

Public attributes

Result => GetResult(0)
T
The deserialized object from the first Candidate response.

Public functions

GetResult(int candidateIndex)
T
Parse the resulting object from the requested candidate response.

Properties

Response

readonly GenerateContentResponse Firebase::AI::GenerateObjectResponse< T >::Response

The underlying GenerateContentResponse returned from the Model.

Public attributes

Result

T Firebase::AI::GenerateObjectResponse< T >::Result => GetResult(0)

The deserialized object from the first Candidate response.

Public functions

GetResult

T Firebase::AI::GenerateObjectResponse< T >::GetResult(
  int candidateIndex
)

Parse the resulting object from the requested candidate response.

Details
Parameters
candidateIndex
The index of the candidate to parse. Note that getting multiple candidates requires configuration settings.
Returns
The deserialized object.