Class GenerateContentRequest (1.39.0)

  GenerateContentRequest 
 ( 
 mapping 
 = 
 None 
 , 
 * 
 , 
 ignore_unknown_fields 
 = 
 False 
 , 
 ** 
 kwargs 
 ) 
 

Request message for [PredictionService.GenerateContent].

Attributes

Name
Description
model
str
Required. The name of the publisher model requested to serve the prediction. Format: projects/{project}/locations/{location}/publishers/*/models/*
contents
MutableSequence[ google.cloud.aiplatform_v1.types.Content ]
Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
tools
MutableSequence[ google.cloud.aiplatform_v1.types.Tool ]
Optional. A list of Tools the model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. The only supported tool is currently Function
safety_settings
MutableSequence[ google.cloud.aiplatform_v1.types.SafetySetting ]
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
generation_config

Methods

GenerateContentRequest

  GenerateContentRequest 
 ( 
 mapping 
 = 
 None 
 , 
 * 
 , 
 ignore_unknown_fields 
 = 
 False 
 , 
 ** 
 kwargs 
 ) 
 

Request message for [PredictionService.GenerateContent].