AWS.Bedrock — AWS SDK for JavaScript (original) (raw)
Property Details
endpoint ⇒ AWS.Endpoint
Returns an Endpoint object representing the endpoint URL for service requests.
Method Details
batchDeleteEvaluationJob(params = {}, callback) ⇒ AWS.Request
Creates a batch deletion job. A model evaluation job can only be deleted if it has following status FAILED
, COMPLETED
, and STOPPED
. You can request up to 25 model evaluation jobs be deleted in a single request.
createEvaluationJob(params = {}, callback) ⇒ AWS.Request
API operation for creating and managing Amazon Bedrock automatic model evaluation jobs and model evaluation jobs that use human workers. To learn more about the requirements for creating a model evaluation job see, Model evaluation.
createGuardrail(params = {}, callback) ⇒ AWS.Request
Creates a guardrail to block topics and to implement safeguards for your generative AI applications.
You can configure the following policies in a guardrail to avoid undesirable and harmful content, filter out denied topics and words, and remove sensitive information for privacy protection.
- Content filters - Adjust filter strengths to block input prompts or model responses containing harmful content.
- Denied topics - Define a set of topics that are undesirable in the context of your application. These topics will be blocked if detected in user queries or model responses.
- Word filters - Configure filters to block undesirable words, phrases, and profanity. Such words can include offensive terms, competitor names etc.
- Sensitive information filters - Block or mask sensitive information such as personally identifiable information (PII) or custom regex in user inputs and model responses.
In addition to the above policies, you can also configure the messages to be returned to the user if a user input or model response is in violation of the policies defined in the guardrail.
For more information, see Guardrails for Amazon Bedrock in the Amazon Bedrock User Guide.
createGuardrailVersion(params = {}, callback) ⇒ AWS.Request
Creates a version of the guardrail. Use this API to create a snapshot of the guardrail when you are satisfied with a configuration, or to compare the configuration with another version.
createModelCopyJob(params = {}, callback) ⇒ AWS.Request
createModelCustomizationJob(params = {}, callback) ⇒ AWS.Request
Creates a fine-tuning job to customize a base model.
You specify the base foundation model and the location of the training data. After the model-customization job completes successfully, your custom model resource will be ready to use. Amazon Bedrock returns validation loss metrics and output generations after the job completes.
For information on the format of training and validation data, see Prepare the datasets.
Model-customization jobs are asynchronous and the completion time depends on the base model and the training/validation data size. To monitor a job, use the GetModelCustomizationJob
operation to retrieve the job status.
For more information, see Custom models in the Amazon Bedrock User Guide.
createModelImportJob(params = {}, callback) ⇒ AWS.Request
Creates a model import job to import model that you have customized in other environments, such as Amazon SageMaker. For more information, see Import a customized model
createModelInvocationJob(params = {}, callback) ⇒ AWS.Request
createProvisionedModelThroughput(params = {}, callback) ⇒ AWS.Request
deleteCustomModel(params = {}, callback) ⇒ AWS.Request
deleteGuardrail(params = {}, callback) ⇒ AWS.Request
Deletes a guardrail.
- To delete a guardrail, only specify the ARN of the guardrail in the
guardrailIdentifier
field. If you delete a guardrail, all of its versions will be deleted. - To delete a version of a guardrail, specify the ARN of the guardrail in the
guardrailIdentifier
field and the version in theguardrailVersion
field.
deleteImportedModel(params = {}, callback) ⇒ AWS.Request
deleteModelInvocationLoggingConfiguration(params = {}, callback) ⇒ AWS.Request
Delete the invocation logging.
deleteProvisionedModelThroughput(params = {}, callback) ⇒ AWS.Request
getCustomModel(params = {}, callback) ⇒ AWS.Request
getEvaluationJob(params = {}, callback) ⇒ AWS.Request
Retrieves the properties associated with a model evaluation job, including the status of the job. For more information, see Model evaluation.
getFoundationModel(params = {}, callback) ⇒ AWS.Request
Get details about a Amazon Bedrock foundation model.
getGuardrail(params = {}, callback) ⇒ AWS.Request
Gets details about a guardrail. If you don't specify a version, the response returns details for the DRAFT
version.
getImportedModel(params = {}, callback) ⇒ AWS.Request
Gets properties associated with a customized model you imported.
getInferenceProfile(params = {}, callback) ⇒ AWS.Request
Gets information about an inference profile. For more information, see the Amazon Bedrock User Guide.
getModelCopyJob(params = {}, callback) ⇒ AWS.Request
getModelCustomizationJob(params = {}, callback) ⇒ AWS.Request
getModelImportJob(params = {}, callback) ⇒ AWS.Request
getModelInvocationJob(params = {}, callback) ⇒ AWS.Request
getModelInvocationLoggingConfiguration(params = {}, callback) ⇒ AWS.Request
Get the current configuration values for model invocation logging.
getProvisionedModelThroughput(params = {}, callback) ⇒ AWS.Request
listCustomModels(params = {}, callback) ⇒ AWS.Request
listEvaluationJobs(params = {}, callback) ⇒ AWS.Request
Lists model evaluation jobs.
listFoundationModels(params = {}, callback) ⇒ AWS.Request
listGuardrails(params = {}, callback) ⇒ AWS.Request
Lists details about all the guardrails in an account. To list the DRAFT
version of all your guardrails, don't specify the guardrailIdentifier
field. To list all versions of a guardrail, specify the ARN of the guardrail in the guardrailIdentifier
field.
You can set the maximum number of results to return in a response in the maxResults
field. If there are more results than the number you set, the response returns a nextToken
that you can send in another ListGuardrails
request to see the next batch of results.
listImportedModels(params = {}, callback) ⇒ AWS.Request
listInferenceProfiles(params = {}, callback) ⇒ AWS.Request
Returns a list of inference profiles that you can use.
listModelCopyJobs(params = {}, callback) ⇒ AWS.Request
listModelCustomizationJobs(params = {}, callback) ⇒ AWS.Request
Returns a list of model customization jobs that you have submitted. You can filter the jobs to return based on one or more criteria.
For more information, see Custom models in the Amazon Bedrock User Guide.
listModelImportJobs(params = {}, callback) ⇒ AWS.Request
listModelInvocationJobs(params = {}, callback) ⇒ AWS.Request
listProvisionedModelThroughputs(params = {}, callback) ⇒ AWS.Request
listTagsForResource(params = {}, callback) ⇒ AWS.Request
putModelInvocationLoggingConfiguration(params = {}, callback) ⇒ AWS.Request
Set the configuration values for model invocation logging.
stopEvaluationJob(params = {}, callback) ⇒ AWS.Request
Stops an in progress model evaluation job.
stopModelCustomizationJob(params = {}, callback) ⇒ AWS.Request
stopModelInvocationJob(params = {}, callback) ⇒ AWS.Request
Stops a batch inference job. You're only charged for tokens that were already processed. For more information, see Stop a batch inference job.
untagResource(params = {}, callback) ⇒ AWS.Request
updateGuardrail(params = {}, callback) ⇒ AWS.Request
Updates a guardrail with the values you specify.
- Specify a
name
and optionaldescription
. - Specify messages for when the guardrail successfully blocks a prompt or a model response in the
blockedInputMessaging
andblockedOutputsMessaging
fields. - Specify topics for the guardrail to deny in the
topicPolicyConfig
object. Each GuardrailTopicConfig object in thetopicsConfig
list pertains to one topic.- Give a
name
anddescription
so that the guardrail can properly identify the topic. - Specify
DENY
in thetype
field. - (Optional) Provide up to five prompts that you would categorize as belonging to the topic in the
examples
list.
- Give a
- Specify filter strengths for the harmful categories defined in Amazon Bedrock in the
contentPolicyConfig
object. Each GuardrailContentFilterConfig object in thefiltersConfig
list pertains to a harmful category. For more information, see Content filters. For more information about the fields in a content filter, see GuardrailContentFilterConfig.- Specify the category in the
type
field. - Specify the strength of the filter for prompts in the
inputStrength
field and for model responses in thestrength
field of the GuardrailContentFilterConfig.
- Specify the category in the
- (Optional) For security, include the ARN of a KMS key in the
kmsKeyId
field.
updateProvisionedModelThroughput(params = {}, callback) ⇒ AWS.Request
waitFor(state, params = {}, callback) ⇒ AWS.Request
Waits for a given Bedrock resource. The final callback or'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.