Skip to content

Commit 8407f00

Browse files
committed
Updated README for Kotlin Bedrock example
1 parent dae7fe2 commit 8407f00

File tree

1 file changed

+14
-43
lines changed

1 file changed

+14
-43
lines changed

kotlin/services/bedrock-runtime/README.md

Lines changed: 14 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
## Overview
44

5-
Shows how to use the AWS SDK for Kotlin to work with Amazon Bedrock Runtime
5+
Shows how to use the AWS SDK for Kotlin to work with Amazon Bedrock Runtime.
66

77
<!--custom.overview.start-->
88
This section provides examples that show how to invoke foundation models using the Amazon Bedrock Runtime API with the AWS SDK for Kotlin.
99
<!--custom.overview.end-->
1010

11-
_Amazon Bedrock enables you to build and scale generative AI applications with foundation models._
11+
_Amazon Bedrock Runtime is a fully managed service that makes it easy to use foundation models from third-party providers and Amazon._
1212

1313
## ⚠ Important
1414

@@ -26,15 +26,14 @@ _Amazon Bedrock enables you to build and scale generative AI applications with f
2626

2727
For prerequisites, see the [README](../../README.md#Prerequisites) in the `kotlin` folder.
2828

29+
2930
<!--custom.prerequisites.start-->
3031
> ⚠ You must request access to a model before you can use it. If you try to use the model (with the API or console) before you have requested access to it, you will receive an error message. For more information, see [Model access](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html).
3132
<!--custom.prerequisites.end-->
33+
### Amazon Titan Text
3234

33-
### Single actions
34-
35-
Code excerpts that show you how to call individual service functions.
35+
- [InvokeModel](src/main/kotlin/com/example/bedrockruntime/InvokeModel.kt#L6)
3636

37-
- [InvokeModel](./src/main/kotlin/com/example/bedrockruntime/InvokeModel.kt) (Demonstrates how to invoke a foundation model to generate content)
3837

3938
<!--custom.examples.start-->
4039
<!--custom.examples.end-->
@@ -43,64 +42,36 @@ Code excerpts that show you how to call individual service functions.
4342

4443
### Instructions
4544

45+
4646
<!--custom.instructions.start-->
4747
<!--custom.instructions.end-->
4848

49+
50+
4951
### Tests
5052

5153
⚠ Running tests might result in charges to your AWS account.
5254

55+
5356
To find instructions for running these tests, see the [README](../../README.md#Tests)
5457
in the `kotlin` folder.
5558

59+
60+
5661
<!--custom.tests.start-->
5762
<!--custom.tests.end-->
5863

5964
## Additional resources
6065

61-
- [Amazon Bedrock User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)
62-
- [Amazon Bedrock API Reference](https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html)
63-
- [SDK for Kotlin Amazon Bedrock reference](https://sdk.amazonaws.com/kotlin/api/latest/bedrock/index.html)
66+
- [Amazon Bedrock Runtime User Guide](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html)
67+
- [Amazon Bedrock Runtime API Reference](https://docs.aws.amazon.com/bedrock/latest/APIReference/welcome.html)
6468
- [SDK for Kotlin Amazon Bedrock Runtime reference](https://sdk.amazonaws.com/kotlin/api/latest/bedrock-runtime/index.html)
6569

6670
<!--custom.resources.start-->
6771
<!--custom.resources.end-->
6872

69-
### Input and Output Format
70-
71-
**Input:**
72-
73-
```json
74-
{
75-
"inputText": "Your prompt here.",
76-
"textGenerationConfig": {
77-
"maxTokenCount": 2000,
78-
"stopSequences": [],
79-
"temperature": 1.0,
80-
"topP": 0.7
81-
}
82-
}
83-
```
84-
You may want to check the doc page [Inference Request Parameters](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html) on the AWS Bedrock documentation for more information on the parameters.
85-
The structure of the input varies depending on the model you are using.
86-
87-
**Output:**
88-
89-
```json
90-
/* Body only */
91-
{
92-
"inputTextTokenCount":7,
93-
"results":[
94-
{"tokenCount":9,
95-
"outputText":"Generated answer.",
96-
"completionReason":"FINISH"
97-
}
98-
]
99-
}
100-
```
101-
10273
---
10374

10475
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
10576

106-
SPDX-License-Identifier: Apache-2.0
77+
SPDX-License-Identifier: Apache-2.0

0 commit comments

Comments
 (0)