GenerateContentResponse class final

Response message for PredictionService.GenerateContent.

Constructors

GenerateContentResponse({List<Candidate> candidates = const [], String modelVersion = '', Timestamp? createTime, String responseId = '', GenerateContentResponse_PromptFeedback? promptFeedback, GenerateContentResponse_UsageMetadata? usageMetadata})
GenerateContentResponse.fromJson(Object? j)
factory

Properties

candidates → List<Candidate>
Output only. Generated candidates.
final
createTime → Timestamp?
Output only. Timestamp when the request is made to the server.
final
hashCode → int
The hash code for this object.
no setterinherited
modelVersion → String
Output only. The model version used to generate the response.
final
promptFeedback → GenerateContentResponse_PromptFeedback?
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
final
qualifiedName → String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
responseId → String
Output only. response_id is used to identify each response. It is the encoding of the event_id.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
usageMetadata → GenerateContentResponse_UsageMetadata?
Usage metadata about the response(s).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Object
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Constants

fullyQualifiedName → const String