public final class GenerateContentRequest extends com.google.protobuf.GeneratedMessageV3 implements GenerateContentRequestOrBuilder
Request message for [PredictionService.GenerateContent].Protobuf type
google.cloud.aiplatform.v1.GenerateContentRequest| Modifier and Type | Class and Description |
|---|---|
static class |
GenerateContentRequest.Builder
Request message for [PredictionService.GenerateContent].
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CONTENTS_FIELD_NUMBER |
static int |
GENERATION_CONFIG_FIELD_NUMBER |
static int |
MODEL_FIELD_NUMBER |
static int |
SAFETY_SETTINGS_FIELD_NUMBER |
static int |
SYSTEM_INSTRUCTION_FIELD_NUMBER |
static int |
TOOLS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Content |
getContents(int index)
Required.
|
int |
getContentsCount()
Required.
|
List<Content> |
getContentsList()
Required.
|
ContentOrBuilder |
getContentsOrBuilder(int index)
Required.
|
List<? extends ContentOrBuilder> |
getContentsOrBuilderList()
Required.
|
static GenerateContentRequest |
getDefaultInstance() |
GenerateContentRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
GenerationConfig |
getGenerationConfig()
Optional.
|
GenerationConfigOrBuilder |
getGenerationConfigOrBuilder()
Optional.
|
String |
getModel()
Required.
|
com.google.protobuf.ByteString |
getModelBytes()
Required.
|
com.google.protobuf.Parser<GenerateContentRequest> |
getParserForType() |
SafetySetting |
getSafetySettings(int index)
Optional.
|
int |
getSafetySettingsCount()
Optional.
|
List<SafetySetting> |
getSafetySettingsList()
Optional.
|
SafetySettingOrBuilder |
getSafetySettingsOrBuilder(int index)
Optional.
|
List<? extends SafetySettingOrBuilder> |
getSafetySettingsOrBuilderList()
Optional.
|
int |
getSerializedSize() |
Content |
getSystemInstruction()
Optional.
|
ContentOrBuilder |
getSystemInstructionOrBuilder()
Optional.
|
Tool |
getTools(int index)
Optional.
|
int |
getToolsCount()
Optional.
|
List<Tool> |
getToolsList()
Optional.
|
ToolOrBuilder |
getToolsOrBuilder(int index)
Optional.
|
List<? extends ToolOrBuilder> |
getToolsOrBuilderList()
Optional.
|
boolean |
hasGenerationConfig()
Optional.
|
int |
hashCode() |
boolean |
hasSystemInstruction()
Optional.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static GenerateContentRequest.Builder |
newBuilder() |
static GenerateContentRequest.Builder |
newBuilder(GenerateContentRequest prototype) |
GenerateContentRequest.Builder |
newBuilderForType() |
protected GenerateContentRequest.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static GenerateContentRequest |
parseDelimitedFrom(InputStream input) |
static GenerateContentRequest |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GenerateContentRequest |
parseFrom(byte[] data) |
static GenerateContentRequest |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GenerateContentRequest |
parseFrom(ByteBuffer data) |
static GenerateContentRequest |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GenerateContentRequest |
parseFrom(com.google.protobuf.ByteString data) |
static GenerateContentRequest |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GenerateContentRequest |
parseFrom(com.google.protobuf.CodedInputStream input) |
static GenerateContentRequest |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static GenerateContentRequest |
parseFrom(InputStream input) |
static GenerateContentRequest |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<GenerateContentRequest> |
parser() |
GenerateContentRequest.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MODEL_FIELD_NUMBER
public static final int CONTENTS_FIELD_NUMBER
public static final int SYSTEM_INSTRUCTION_FIELD_NUMBER
public static final int TOOLS_FIELD_NUMBER
public static final int SAFETY_SETTINGS_FIELD_NUMBER
public static final int GENERATION_CONFIG_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public String 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];getModel in interface GenerateContentRequestOrBuilderpublic com.google.protobuf.ByteString getModelBytes()
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];getModelBytes in interface GenerateContentRequestOrBuilderpublic List<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.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContentsList in interface GenerateContentRequestOrBuilderpublic List<? extends ContentOrBuilder> 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.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContentsOrBuilderList in interface GenerateContentRequestOrBuilderpublic int getContentsCount()
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.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContentsCount in interface GenerateContentRequestOrBuilderpublic Content getContents(int index)
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.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContents in interface GenerateContentRequestOrBuilderpublic ContentOrBuilder getContentsOrBuilder(int index)
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.aiplatform.v1.Content contents = 2 [(.google.api.field_behavior) = REQUIRED];
getContentsOrBuilder in interface GenerateContentRequestOrBuilderpublic boolean hasSystemInstruction()
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.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
hasSystemInstruction in interface GenerateContentRequestOrBuilderpublic Content getSystemInstruction()
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.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
getSystemInstruction in interface GenerateContentRequestOrBuilderpublic ContentOrBuilder getSystemInstructionOrBuilder()
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.aiplatform.v1.Content system_instruction = 8 [(.google.api.field_behavior) = OPTIONAL];
getSystemInstructionOrBuilder in interface GenerateContentRequestOrBuilderpublic List<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.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getToolsList in interface GenerateContentRequestOrBuilderpublic List<? extends ToolOrBuilder> 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.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getToolsOrBuilderList in interface GenerateContentRequestOrBuilderpublic int 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.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getToolsCount in interface GenerateContentRequestOrBuilderpublic Tool getTools(int index)
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.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getTools in interface GenerateContentRequestOrBuilderpublic ToolOrBuilder getToolsOrBuilder(int index)
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.aiplatform.v1.Tool tools = 6 [(.google.api.field_behavior) = OPTIONAL];
getToolsOrBuilder in interface GenerateContentRequestOrBuilderpublic List<SafetySetting> getSafetySettingsList()
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettingsList in interface GenerateContentRequestOrBuilderpublic List<? extends SafetySettingOrBuilder> getSafetySettingsOrBuilderList()
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettingsOrBuilderList in interface GenerateContentRequestOrBuilderpublic int getSafetySettingsCount()
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettingsCount in interface GenerateContentRequestOrBuilderpublic SafetySetting getSafetySettings(int index)
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettings in interface GenerateContentRequestOrBuilderpublic SafetySettingOrBuilder getSafetySettingsOrBuilder(int index)
Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
repeated .google.cloud.aiplatform.v1.SafetySetting safety_settings = 3 [(.google.api.field_behavior) = OPTIONAL];
getSafetySettingsOrBuilder in interface GenerateContentRequestOrBuilderpublic boolean hasGenerationConfig()
Optional. Generation config.
.google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
hasGenerationConfig in interface GenerateContentRequestOrBuilderpublic GenerationConfig getGenerationConfig()
Optional. Generation config.
.google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
getGenerationConfig in interface GenerateContentRequestOrBuilderpublic GenerationConfigOrBuilder getGenerationConfigOrBuilder()
Optional. Generation config.
.google.cloud.aiplatform.v1.GenerationConfig generation_config = 4 [(.google.api.field_behavior) = OPTIONAL];
getGenerationConfigOrBuilder in interface GenerateContentRequestOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static GenerateContentRequest parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static GenerateContentRequest parseFrom(InputStream input) throws IOException
IOExceptionpublic static GenerateContentRequest parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static GenerateContentRequest parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static GenerateContentRequest parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static GenerateContentRequest parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static GenerateContentRequest parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic GenerateContentRequest.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static GenerateContentRequest.Builder newBuilder()
public static GenerateContentRequest.Builder newBuilder(GenerateContentRequest prototype)
public GenerateContentRequest.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected GenerateContentRequest.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static GenerateContentRequest getDefaultInstance()
public static com.google.protobuf.Parser<GenerateContentRequest> parser()
public com.google.protobuf.Parser<GenerateContentRequest> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public GenerateContentRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2024 Google LLC. All rights reserved.