Class GenerateContentRequest (1.48.0)

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

Request message for [PredictionService.GenerateContent].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Attributes

NameDescription
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_v1beta1.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.
system_instruction google.cloud.aiplatform_v1beta1.types.Content
Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph. This field is a member of oneof_ _system_instruction.
tools MutableSequence[google.cloud.aiplatform_v1beta1.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.
tool_config google.cloud.aiplatform_v1beta1.types.ToolConfig
Optional. Tool config. This config is shared for all tools provided in the request.
safety_settings MutableSequence[google.cloud.aiplatform_v1beta1.types.SafetySetting]
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
generation_config google.cloud.aiplatform_v1beta1.types.GenerationConfig
Optional. Generation config.

Methods

GenerateContentRequest

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

Request message for [PredictionService.GenerateContent].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields