@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ConverseRequest extends AmazonWebServiceRequest implements Serializable, Cloneable
NOOP
Constructor and Description |
---|
ConverseRequest() |
Modifier and Type | Method and Description |
---|---|
ConverseRequest |
clone()
Creates a shallow clone of this object for all fields except the handler context.
|
boolean |
equals(Object obj) |
List<String> |
getAdditionalModelResponseFieldPaths()
Additional model parameters field paths to return in the response.
|
GuardrailConfiguration |
getGuardrailConfig()
Configuration information for a guardrail that you want to use in the request.
|
InferenceConfiguration |
getInferenceConfig()
Inference parameters to pass to the model.
|
List<Message> |
getMessages()
The messages that you want to send to the model.
|
String |
getModelId()
The identifier for the model that you want to call.
|
List<SystemContentBlock> |
getSystem()
A system prompt to pass to the model.
|
ToolConfiguration |
getToolConfig()
Configuration information for the tools that the model can use when generating a response.
|
int |
hashCode() |
void |
setAdditionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.
|
void |
setGuardrailConfig(GuardrailConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
|
void |
setInferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model.
|
void |
setMessages(Collection<Message> messages)
The messages that you want to send to the model.
|
void |
setModelId(String modelId)
The identifier for the model that you want to call.
|
void |
setSystem(Collection<SystemContentBlock> system)
A system prompt to pass to the model.
|
void |
setToolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.
|
String |
toString()
Returns a string representation of this object.
|
ConverseRequest |
withAdditionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.
|
ConverseRequest |
withAdditionalModelResponseFieldPaths(String... additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response.
|
ConverseRequest |
withGuardrailConfig(GuardrailConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
|
ConverseRequest |
withInferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model.
|
ConverseRequest |
withMessages(Collection<Message> messages)
The messages that you want to send to the model.
|
ConverseRequest |
withMessages(Message... messages)
The messages that you want to send to the model.
|
ConverseRequest |
withModelId(String modelId)
The identifier for the model that you want to call.
|
ConverseRequest |
withSystem(Collection<SystemContentBlock> system)
A system prompt to pass to the model.
|
ConverseRequest |
withSystem(SystemContentBlock... system)
A system prompt to pass to the model.
|
ConverseRequest |
withToolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.
|
addHandlerContext, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getHandlerContext, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestCredentialsProvider, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
public void setModelId(String modelId)
The identifier for the model that you want to call.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
modelId
- The identifier for the model that you want to call.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
public String getModelId()
The identifier for the model that you want to call.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
public ConverseRequest withModelId(String modelId)
The identifier for the model that you want to call.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
modelId
- The identifier for the model that you want to call.
The modelId
to provide depends on the type of model that you use:
If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see Amazon Bedrock base model IDs (on-demand throughput) in the Amazon Bedrock User Guide.
If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see Run inference using a Provisioned Throughput in the Amazon Bedrock User Guide.
If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see Use a custom model in Amazon Bedrock in the Amazon Bedrock User Guide.
public List<Message> getMessages()
The messages that you want to send to the model.
public void setMessages(Collection<Message> messages)
The messages that you want to send to the model.
messages
- The messages that you want to send to the model.public ConverseRequest withMessages(Message... messages)
The messages that you want to send to the model.
NOTE: This method appends the values to the existing list (if any). Use
setMessages(java.util.Collection)
or withMessages(java.util.Collection)
if you want to override
the existing values.
messages
- The messages that you want to send to the model.public ConverseRequest withMessages(Collection<Message> messages)
The messages that you want to send to the model.
messages
- The messages that you want to send to the model.public List<SystemContentBlock> getSystem()
A system prompt to pass to the model.
public void setSystem(Collection<SystemContentBlock> system)
A system prompt to pass to the model.
system
- A system prompt to pass to the model.public ConverseRequest withSystem(SystemContentBlock... system)
A system prompt to pass to the model.
NOTE: This method appends the values to the existing list (if any). Use
setSystem(java.util.Collection)
or withSystem(java.util.Collection)
if you want to override the
existing values.
system
- A system prompt to pass to the model.public ConverseRequest withSystem(Collection<SystemContentBlock> system)
A system prompt to pass to the model.
system
- A system prompt to pass to the model.public void setInferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model. Converse
supports a base set of inference parameters. If
you need to pass additional parameters that the model supports, use the additionalModelRequestFields
request field.
inferenceConfig
- Inference parameters to pass to the model. Converse
supports a base set of inference
parameters. If you need to pass additional parameters that the model supports, use the
additionalModelRequestFields
request field.public InferenceConfiguration getInferenceConfig()
Inference parameters to pass to the model. Converse
supports a base set of inference parameters. If
you need to pass additional parameters that the model supports, use the additionalModelRequestFields
request field.
Converse
supports a base set of inference
parameters. If you need to pass additional parameters that the model supports, use the
additionalModelRequestFields
request field.public ConverseRequest withInferenceConfig(InferenceConfiguration inferenceConfig)
Inference parameters to pass to the model. Converse
supports a base set of inference parameters. If
you need to pass additional parameters that the model supports, use the additionalModelRequestFields
request field.
inferenceConfig
- Inference parameters to pass to the model. Converse
supports a base set of inference
parameters. If you need to pass additional parameters that the model supports, use the
additionalModelRequestFields
request field.public void setToolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.
This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
toolConfig
- Configuration information for the tools that the model can use when generating a response. This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
public ToolConfiguration getToolConfig()
Configuration information for the tools that the model can use when generating a response.
This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
public ConverseRequest withToolConfig(ToolConfiguration toolConfig)
Configuration information for the tools that the model can use when generating a response.
This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
toolConfig
- Configuration information for the tools that the model can use when generating a response. This field is only supported by Anthropic Claude 3, Cohere Command R, Cohere Command R+, and Mistral Large models.
public void setGuardrailConfig(GuardrailConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
guardrailConfig
- Configuration information for a guardrail that you want to use in the request.public GuardrailConfiguration getGuardrailConfig()
Configuration information for a guardrail that you want to use in the request.
public ConverseRequest withGuardrailConfig(GuardrailConfiguration guardrailConfig)
Configuration information for a guardrail that you want to use in the request.
guardrailConfig
- Configuration information for a guardrail that you want to use in the request.public List<String> getAdditionalModelResponseFieldPaths()
Additional model parameters field paths to return in the response. Converse
returns the requested
fields as a JSON Pointer object in the additionalModelResponseFields
field. The following is example
JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model response,
it is ignored by Converse
.
Converse
returns the
requested fields as a JSON Pointer object in the additionalModelResponseFields
field. The
following is example JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model
response, it is ignored by Converse
.
public void setAdditionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response. Converse
returns the requested
fields as a JSON Pointer object in the additionalModelResponseFields
field. The following is example
JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model response,
it is ignored by Converse
.
additionalModelResponseFieldPaths
- Additional model parameters field paths to return in the response. Converse
returns the
requested fields as a JSON Pointer object in the additionalModelResponseFields
field. The
following is example JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model
response, it is ignored by Converse
.
public ConverseRequest withAdditionalModelResponseFieldPaths(String... additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response. Converse
returns the requested
fields as a JSON Pointer object in the additionalModelResponseFields
field. The following is example
JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model response,
it is ignored by Converse
.
NOTE: This method appends the values to the existing list (if any). Use
setAdditionalModelResponseFieldPaths(java.util.Collection)
or
withAdditionalModelResponseFieldPaths(java.util.Collection)
if you want to override the existing values.
additionalModelResponseFieldPaths
- Additional model parameters field paths to return in the response. Converse
returns the
requested fields as a JSON Pointer object in the additionalModelResponseFields
field. The
following is example JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model
response, it is ignored by Converse
.
public ConverseRequest withAdditionalModelResponseFieldPaths(Collection<String> additionalModelResponseFieldPaths)
Additional model parameters field paths to return in the response. Converse
returns the requested
fields as a JSON Pointer object in the additionalModelResponseFields
field. The following is example
JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model response,
it is ignored by Converse
.
additionalModelResponseFieldPaths
- Additional model parameters field paths to return in the response. Converse
returns the
requested fields as a JSON Pointer object in the additionalModelResponseFields
field. The
following is example JSON for additionalModelResponseFieldPaths
.
[ "/stop_sequence" ]
For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation.
Converse
rejects an empty JSON Pointer or incorrectly structured JSON Pointer with a
400
error code. if the JSON Pointer is valid, but the requested field is not in the model
response, it is ignored by Converse
.
public String toString()
toString
in class Object
Object.toString()
public ConverseRequest clone()
AmazonWebServiceRequest
clone
in class AmazonWebServiceRequest
Object.clone()