GenerateAnswerRequest class final

Request to generate a grounded answer from the Model.

Inheritance
  • Object
  • ProtoMessage
  • GenerateAnswerRequest

Constructors

GenerateAnswerRequest({GroundingPassages? inlinePassages, SemanticRetrieverConfig? semanticRetriever, required String model, required List<Content> contents, required GenerateAnswerRequest_AnswerStyle answerStyle, List<SafetySetting> safetySettings = const [], double? temperature})
GenerateAnswerRequest.fromJson(Map<String, dynamic> json)
factory

Properties

answerStyle GenerateAnswerRequest_AnswerStyle
Required. Style in which answers should be returned.
final
contents List<Content>
Required. The content of the current conversation with the Model. For single-turn queries, this is a single question to answer. For multi-turn queries, this is a repeated field that contains conversation history and the last Content in the list containing the question.
final
hashCode int
The hash code for this object.
no setterinherited
inlinePassages GroundingPassages?
Passages provided inline with the request.
final
model String
Required. The name of the Model to use for generating the grounded response.
final
qualifiedName String
The fully qualified name of this message, i.e., google.protobuf.Duration or google.rpc.ErrorInfo.
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
safetySettings List<SafetySetting>
Optional. A list of unique SafetySetting instances for blocking unsafe content.
final
semanticRetriever SemanticRetrieverConfig?
Content retrieved from resources created via the Semantic Retriever API.
final
temperature double?
Optional. Controls the randomness of the output.
final

Methods

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

Operators

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

Constants

fullyQualifiedName → const String