Skip to content

Retrieves information about the working draft (DRAFT version) of a prompt or a version of it, depending on whether you include the promptVersion field or not

Description

Retrieves information about the working draft (DRAFT version) of a prompt or a version of it, depending on whether you include the promptVersion field or not. For more information, see View information about prompts using Prompt management and View information about a version of your prompt in the Amazon Bedrock User Guide.

Usage

bedrockagent_get_prompt(promptIdentifier, promptVersion, includedData)

Arguments

  • promptIdentifier

[required] The unique identifier of the prompt.

  • promptVersion

The version of the prompt about which you want to retrieve information. Omit this field to return information about the working draft of the prompt.

  • includedData

Controls the scope of data returned. Set to METADATA_ONLY to return only resource metadata. Set to ALL_DATA or omit this field to return the full response.

Value

A list with the following syntax:

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

Request syntax

svc$get_prompt(
  promptIdentifier = "string",
  promptVersion = "string",
  includedData = "ALL_DATA"|"METADATA_ONLY"
)