Skip to content

Create Prompt Version

bedrockagent_create_prompt_version R Documentation

Creates a static snapshot of your prompt that can be deployed to production

Description

Creates a static snapshot of your prompt that can be deployed to production. For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide.

Usage

bedrockagent_create_prompt_version(clientToken, description,
  promptIdentifier, tags)

Arguments

clientToken

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error. For more information, see Ensuring idempotency.

description

A description for the version of the prompt.

promptIdentifier

[required] The unique identifier of the prompt that you want to create a version of.

tags

Any tags that you want to attach to the version of the prompt. For more information, see Tagging resources in Amazon Bedrock.

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$create_prompt_version(
  clientToken = "string",
  description = "string",
  promptIdentifier = "string",
  tags = list(
    "string"
  )
)