Create Flow
bedrockagent_create_flow | R Documentation |
Creates a prompt flow that you can use to send an input through various steps to yield an output¶
Description¶
Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
Usage¶
bedrockagent_create_flow(clientToken, customerEncryptionKeyArn,
definition, description, executionRoleArn, name, 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.
customerEncryptionKeyArn
The Amazon Resource Name (ARN) of the KMS key to encrypt the flow.
definition
A definition of the nodes and connections between nodes in the flow.
description
A description for the flow.
executionRoleArn
[required] The Amazon Resource Name (ARN) of the service role with permissions to create and manage a flow. For more information, see Create a service role for flows in Amazon Bedrock in the Amazon Bedrock User Guide.
name
[required] A name for the flow.
tags
Any tags that you want to attach to the flow. 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",
definition = list(
connections = list(
list(
configuration = list(
conditional = list(
condition = "string"
),
data = list(
sourceOutput = "string",
targetInput = "string"
)
),
name = "string",
source = "string",
target = "string",
type = "Data"|"Conditional"
)
),
nodes = list(
list(
configuration = list(
agent = list(
agentAliasArn = "string"
),
collector = list(),
condition = list(
conditions = list(
list(
expression = "string",
name = "string"
)
)
),
input = list(),
iterator = list(),
knowledgeBase = list(
guardrailConfiguration = list(
guardrailIdentifier = "string",
guardrailVersion = "string"
),
knowledgeBaseId = "string",
modelId = "string"
),
lambdaFunction = list(
lambdaArn = "string"
),
lex = list(
botAliasArn = "string",
localeId = "string"
),
output = list(),
prompt = list(
guardrailConfiguration = list(
guardrailIdentifier = "string",
guardrailVersion = "string"
),
sourceConfiguration = list(
inline = list(
additionalModelRequestFields = list(),
inferenceConfiguration = list(
text = list(
maxTokens = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topP = 123.0
)
),
modelId = "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"
),
resource = list(
promptArn = "string"
)
)
),
retrieval = list(
serviceConfiguration = list(
s3 = list(
bucketName = "string"
)
)
),
storage = list(
serviceConfiguration = list(
s3 = list(
bucketName = "string"
)
)
)
),
inputs = list(
list(
expression = "string",
name = "string",
type = "String"|"Number"|"Boolean"|"Object"|"Array"
)
),
name = "string",
outputs = list(
list(
name = "string",
type = "String"|"Number"|"Boolean"|"Object"|"Array"
)
),
type = "Input"|"Output"|"KnowledgeBase"|"Condition"|"Lex"|"Prompt"|"LambdaFunction"|"Storage"|"Agent"|"Retrieval"|"Iterator"|"Collector"
)
)
),
description = "string",
executionRoleArn = "string",
id = "string",
name = "string",
status = "Failed"|"Prepared"|"Preparing"|"NotPrepared",
updatedAt = as.POSIXct(
"2015-01-01"
),
version = "string"
)
Request syntax¶
svc$create_flow(
clientToken = "string",
customerEncryptionKeyArn = "string",
definition = list(
connections = list(
list(
configuration = list(
conditional = list(
condition = "string"
),
data = list(
sourceOutput = "string",
targetInput = "string"
)
),
name = "string",
source = "string",
target = "string",
type = "Data"|"Conditional"
)
),
nodes = list(
list(
configuration = list(
agent = list(
agentAliasArn = "string"
),
collector = list(),
condition = list(
conditions = list(
list(
expression = "string",
name = "string"
)
)
),
input = list(),
iterator = list(),
knowledgeBase = list(
guardrailConfiguration = list(
guardrailIdentifier = "string",
guardrailVersion = "string"
),
knowledgeBaseId = "string",
modelId = "string"
),
lambdaFunction = list(
lambdaArn = "string"
),
lex = list(
botAliasArn = "string",
localeId = "string"
),
output = list(),
prompt = list(
guardrailConfiguration = list(
guardrailIdentifier = "string",
guardrailVersion = "string"
),
sourceConfiguration = list(
inline = list(
additionalModelRequestFields = list(),
inferenceConfiguration = list(
text = list(
maxTokens = 123,
stopSequences = list(
"string"
),
temperature = 123.0,
topP = 123.0
)
),
modelId = "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"
),
resource = list(
promptArn = "string"
)
)
),
retrieval = list(
serviceConfiguration = list(
s3 = list(
bucketName = "string"
)
)
),
storage = list(
serviceConfiguration = list(
s3 = list(
bucketName = "string"
)
)
)
),
inputs = list(
list(
expression = "string",
name = "string",
type = "String"|"Number"|"Boolean"|"Object"|"Array"
)
),
name = "string",
outputs = list(
list(
name = "string",
type = "String"|"Number"|"Boolean"|"Object"|"Array"
)
),
type = "Input"|"Output"|"KnowledgeBase"|"Condition"|"Lex"|"Prompt"|"LambdaFunction"|"Storage"|"Agent"|"Retrieval"|"Iterator"|"Collector"
)
)
),
description = "string",
executionRoleArn = "string",
name = "string",
tags = list(
"string"
)
)