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(name, description, customerEncryptionKeyArn,
defaultVariant, variants, promptIdentifier)
Arguments¶
name
[required] A name for the prompt.
description
A description for the prompt.
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.
variants
A list of objects, each containing details about a variant of the prompt.
promptIdentifier
[required] The unique identifier of the prompt.
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$update_prompt(
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"
)
)
)
),
promptIdentifier = "string"
)