Invoke Model With Bidirectional Stream
bedrockruntime_invoke_model_with_bidirectional_stream | R Documentation |
Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream¶
Description¶
Invoke the specified Amazon Bedrock model to run inference using the bidirectional stream. The response is returned in a stream that remains open for 8 minutes. A single session can contain multiple prompts and responses from the model. The prompts to the model are provided as audio files and the model's responses are spoken back to the user and transcribed.
It is possible for users to interrupt the model's response with a new prompt, which will halt the response speech. The model will retain contextual awareness of the conversation while pivoting to respond to the new prompt.
Usage¶
bedrockruntime_invoke_model_with_bidirectional_stream(modelId, body)
Arguments¶
modelId |
[required] The model ID or ARN of the model ID to use. Currently,
only |
body |
[required] The prompt and inference parameters in the format
specified in the |
Value¶
A list with the following syntax:
list(
body = list(
chunk = list(
bytes = raw
),
internalServerException = list(
message = "string"
),
modelStreamErrorException = list(
message = "string",
originalStatusCode = 123,
originalMessage = "string"
),
validationException = list(
message = "string"
),
throttlingException = list(
message = "string"
),
modelTimeoutException = list(
message = "string"
),
serviceUnavailableException = list(
message = "string"
)
)
)
Request syntax¶
svc$invoke_model_with_bidirectional_stream(
modelId = "string",
body = list(
chunk = list(
bytes = raw
)
)
)