publicfinalclass GenerateContentRequestextendsGeneratedMessageV3implementsGenerateContentRequestOrBuilder
Request message for [PredictionService.GenerateContent].
Protobuf type google.cloud.vertexai.v1.GenerateContentRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
CONTENTS_FIELD_NUMBER
publicstaticfinalintCONTENTS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
GENERATION_CONFIG_FIELD_NUMBER
publicstaticfinalintGENERATION_CONFIG_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
MODEL_FIELD_NUMBER
publicstaticfinalintMODEL_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
SAFETY_SETTINGS_FIELD_NUMBER
publicstaticfinalintSAFETY_SETTINGS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
SYSTEM_INSTRUCTION_FIELD_NUMBER
publicstaticfinalintSYSTEM_INSTRUCTION_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
TOOLS_FIELD_NUMBER
publicstaticfinalintTOOLS_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
TOOL_CONFIG_FIELD_NUMBER
publicstaticfinalintTOOL_CONFIG_FIELD_NUMBER
| Field Value |
| Type |
Description |
int |
Static Methods
getDefaultInstance()
publicstaticGenerateContentRequestgetDefaultInstance()
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()
newBuilder()
publicstaticGenerateContentRequest.BuildernewBuilder()
newBuilder(GenerateContentRequest prototype)
publicstaticGenerateContentRequest.BuildernewBuilder(GenerateContentRequestprototype)
parseDelimitedFrom(InputStream input)
publicstaticGenerateContentRequestparseDelimitedFrom(InputStreaminput)
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(byte[] data)
publicstaticGenerateContentRequestparseFrom(byte[]data)
| Parameter |
| Name |
Description |
data |
byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
parseFrom(ByteString data)
publicstaticGenerateContentRequestparseFrom(ByteStringdata)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
parseFrom(CodedInputStream input)
publicstaticGenerateContentRequestparseFrom(CodedInputStreaminput)
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(InputStream input)
publicstaticGenerateContentRequestparseFrom(InputStreaminput)
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
parseFrom(ByteBuffer data)
publicstaticGenerateContentRequestparseFrom(ByteBufferdata)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
publicstaticGenerateContentRequestparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
parser()
publicstaticParser<GenerateContentRequest>parser()
Methods
equals(Object obj)
publicbooleanequals(Objectobj)
| Parameter |
| Name |
Description |
obj |
Object
|
Overrides
getContents(int index)
publicContentgetContents(intindex)
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.
repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter |
| Name |
Description |
index |
int
|
getContentsCount()
publicintgetContentsCount()
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.
repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
int |
getContentsList()
publicList<Content>getContentsList()
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.
repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContentsOrBuilder(int index)
publicContentOrBuildergetContentsOrBuilder(intindex)
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.
repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
| Parameter |
| Name |
Description |
index |
int
|
getContentsOrBuilderList()
publicList<?extendsContentOrBuilder>getContentsOrBuilderList()
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.
repeated .google.cloud.vertexai.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.ContentOrBuilder> |
getDefaultInstanceForType()
publicGenerateContentRequestgetDefaultInstanceForType()
getGenerationConfig()
publicGenerationConfiggetGenerationConfig()
Optional. Generation config.
.google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
getGenerationConfigOrBuilder()
publicGenerationConfigOrBuildergetGenerationConfigOrBuilder()
Optional. Generation config.
.google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
getModel()
Required. The name of the publisher model requested to serve the
prediction. Format:
projects/{project}/locations/{location}/publishers/*/models/*
string model = 5 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
String |
The model.
|
getModelBytes()
publicByteStringgetModelBytes()
Required. The name of the publisher model requested to serve the
prediction. Format:
projects/{project}/locations/{location}/publishers/*/models/*
string model = 5 [(.google.api.field_behavior) = REQUIRED];
| Returns |
| Type |
Description |
ByteString |
The bytes for model.
|
getParserForType()
publicParser<GenerateContentRequest>getParserForType()
Overrides
getSafetySettings(int index)
publicSafetySettinggetSafetySettings(intindex)
Optional. Per request settings for blocking unsafe content.
Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getSafetySettingsCount()
publicintgetSafetySettingsCount()
Optional. Per request settings for blocking unsafe content.
Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
getSafetySettingsList()
publicList<SafetySetting>getSafetySettingsList()
Optional. Per request settings for blocking unsafe content.
Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettingsOrBuilder(int index)
publicSafetySettingOrBuildergetSafetySettingsOrBuilder(intindex)
Optional. Per request settings for blocking unsafe content.
Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getSafetySettingsOrBuilderList()
publicList<?extendsSafetySettingOrBuilder>getSafetySettingsOrBuilderList()
Optional. Per request settings for blocking unsafe content.
Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.vertexai.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.SafetySettingOrBuilder> |
getSerializedSize()
publicintgetSerializedSize()
| Returns |
| Type |
Description |
int |
Overrides
getSystemInstruction()
publicContentgetSystemInstruction()
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.
optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
Content |
The systemInstruction.
|
getSystemInstructionOrBuilder()
publicContentOrBuildergetSystemInstructionOrBuilder()
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.
optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
getToolConfig()
publicToolConfiggetToolConfig()
Optional. Tool config. This config is shared for all tools provided in the
request.
.google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
ToolConfig |
The toolConfig.
|
getToolConfigOrBuilder()
publicToolConfigOrBuildergetToolConfigOrBuilder()
Optional. Tool config. This config is shared for all tools provided in the
request.
.google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
getTools(int index)
publicToolgetTools(intindex)
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.
repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
| Returns |
| Type |
Description |
Tool |
getToolsCount()
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.
repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
int |
getToolsList()
publicList<Tool>getToolsList()
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.
repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getToolsOrBuilder(int index)
publicToolOrBuildergetToolsOrBuilder(intindex)
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.
repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
| Parameter |
| Name |
Description |
index |
int
|
getToolsOrBuilderList()
publicList<?extendsToolOrBuilder>getToolsOrBuilderList()
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.
repeated .google.cloud.vertexai.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
List<? extends com.google.cloud.vertexai.api.ToolOrBuilder> |
hasGenerationConfig()
publicbooleanhasGenerationConfig()
Optional. Generation config.
.google.cloud.vertexai.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the generationConfig field is set.
|
hasSystemInstruction()
publicbooleanhasSystemInstruction()
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.
optional .google.cloud.vertexai.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the systemInstruction field is set.
|
hasToolConfig()
publicbooleanhasToolConfig()
Optional. Tool config. This config is shared for all tools provided in the
request.
.google.cloud.vertexai.v1.ToolConfig tool_config = 7 [(.google.api.field_behavior) = OPTIONAL];
| Returns |
| Type |
Description |
boolean |
Whether the toolConfig field is set.
|
hashCode()
| Returns |
| Type |
Description |
int |
Overrides
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Overrides
isInitialized()
publicfinalbooleanisInitialized()
Overrides
newBuilderForType()
publicGenerateContentRequest.BuildernewBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protectedGenerateContentRequest.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
| Returns |
| Type |
Description |
Object |
Overrides
toBuilder()
publicGenerateContentRequest.BuildertoBuilder()
writeTo(CodedOutputStream output)
publicvoidwriteTo(CodedOutputStreamoutput)
Overrides