View source on GitHub |
Request to generate a grounded answer from the model.
This message has oneof
_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
Attributes | |
---|---|
inline_passages
|
google.ai.generativelanguage.GroundingPassages
Passages provided inline with the request. This field is a member of |
semantic_retriever
|
google.ai.generativelanguage.SemanticRetrieverConfig
Content retrieved from resources created via the Semantic Retriever API. This field is a member of |
model
|
str
Required. The name of the Format: |
contents
|
MutableSequence[google.ai.generativelanguage.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 |
answer_style
|
google.ai.generativelanguage.GenerateAnswerRequest.AnswerStyle
Required. Style in which answers should be returned. |
safety_settings
|
MutableSequence[google.ai.generativelanguage.SafetySetting]
Optional. A list of unique This will be enforced on the
|
temperature
|
float
Optional. Controls the randomness of the output. Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will produce responses that are more varied and creative, while a value closer to 0.0 will typically result in more straightforward responses from the model. A low temperature (~0.2) is usually recommended for Attributed-Question-Answering use cases. |