Skip to content

Update Prompt

bedrockagent_update_prompt R Documentation

Modifies a prompt in your prompt library

Description

Modifies a prompt in your prompt library. Include both fields that you want to keep and fields that you want to replace. For more information, see Prompt management in Amazon Bedrock and Edit prompts in your prompt library in the Amazon Bedrock User Guide.

Usage

bedrockagent_update_prompt(customerEncryptionKeyArn, defaultVariant,
  description, name, promptIdentifier, variants)

Arguments

customerEncryptionKeyArn

The Amazon Resource Name (ARN) of the KMS key to encrypt the prompt.

defaultVariant

The name of the default variant for the prompt. This value must match the name field in the relevant PromptVariant object.

description

A description for the prompt.

name

[required] A name for the prompt.

promptIdentifier

[required] The unique identifier of the prompt.

variants

A list of objects, each containing details about a variant of the prompt.

Value

A list with the following syntax:

list(
  arn = "string",
  createdAt = as.POSIXct(
    "2015-01-01"
  ),
  customerEncryptionKeyArn = "string",
  defaultVariant = "string",
  description = "string",
  id = "string",
  name = "string",
  updatedAt = as.POSIXct(
    "2015-01-01"
  ),
  variants = list(
    list(
      additionalModelRequestFields = list(),
      genAiResource = list(
        agent = list(
          agentIdentifier = "string"
        )
      ),
      inferenceConfiguration = list(
        text = list(
          maxTokens = 123,
          stopSequences = list(
            "string"
          ),
          temperature = 123.0,
          topP = 123.0
        )
      ),
      metadata = list(
        list(
          key = "string",
          value = "string"
        )
      ),
      modelId = "string",
      name = "string",
      templateConfiguration = list(
        chat = list(
          inputVariables = list(
            list(
              name = "string"
            )
          ),
          messages = list(
            list(
              content = list(
                list(
                  text = "string"
                )
              ),
              role = "user"|"assistant"
            )
          ),
          system = list(
            list(
              text = "string"
            )
          ),
          toolConfiguration = list(
            toolChoice = list(
              any = list(),
              auto = list(),
              tool = list(
                name = "string"
              )
            ),
            tools = list(
              list(
                toolSpec = list(
                  description = "string",
                  inputSchema = list(
                    json = list()
                  ),
                  name = "string"
                )
              )
            )
          )
        ),
        text = list(
          inputVariables = list(
            list(
              name = "string"
            )
          ),
          text = "string"
        )
      ),
      templateType = "TEXT"|"CHAT"
    )
  ),
  version = "string"
)

Request syntax

svc$update_prompt(
  customerEncryptionKeyArn = "string",
  defaultVariant = "string",
  description = "string",
  name = "string",
  promptIdentifier = "string",
  variants = list(
    list(
      additionalModelRequestFields = list(),
      genAiResource = list(
        agent = list(
          agentIdentifier = "string"
        )
      ),
      inferenceConfiguration = list(
        text = list(
          maxTokens = 123,
          stopSequences = list(
            "string"
          ),
          temperature = 123.0,
          topP = 123.0
        )
      ),
      metadata = list(
        list(
          key = "string",
          value = "string"
        )
      ),
      modelId = "string",
      name = "string",
      templateConfiguration = list(
        chat = list(
          inputVariables = list(
            list(
              name = "string"
            )
          ),
          messages = list(
            list(
              content = list(
                list(
                  text = "string"
                )
              ),
              role = "user"|"assistant"
            )
          ),
          system = list(
            list(
              text = "string"
            )
          ),
          toolConfiguration = list(
            toolChoice = list(
              any = list(),
              auto = list(),
              tool = list(
                name = "string"
              )
            ),
            tools = list(
              list(
                toolSpec = list(
                  description = "string",
                  inputSchema = list(
                    json = list()
                  ),
                  name = "string"
                )
              )
            )
          )
        ),
        text = list(
          inputVariables = list(
            list(
              name = "string"
            )
          ),
          text = "string"
        )
      ),
      templateType = "TEXT"|"CHAT"
    )
  )
)