You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: models/spring-ai-bedrock/README.md
+8-60Lines changed: 8 additions & 60 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
3
3
[Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/what-is-bedrock.html) is a managed service that provides foundation models from various AI providers, available through a unified API.
4
4
5
-
6
5
Spring AI implements `API` clients for the [Bedrock models](https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html) along with implementations for the `ChatClient`, `StreamingChatClient` and the `EmbeddingClient`.
7
6
8
7
The API clients provide structured, type-safe implementation for the Bedrock models, while the `ChatClient`, `StreamingChatClient` and the `EmbeddingClient` implementations provide Chat and Embedding clients compliant with the Spring-AI API. Later can be used interchangeably with the other (e.g. OpenAI, Azure OpenAI,
@@ -21,64 +20,13 @@ Also Spring-AI provides Spring Auto-Configurations and Boot Starters for all cli
21
20
22
21
Go to [Amazon Bedrock](https://us-east-1.console.aws.amazon.com/bedrock/home) and from the [Model Access](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/modelaccess) menu on the left configure the access to the models you are going to use.
23
22
24
-
## Quick start
25
-
26
-
Add the `spring-ai-bedrock-ai-spring-boot-starter` dependency to your project POM:
Use the `BedrockAwsConnectionProperties` to configure the AWS credentials and region:
39
-
40
-
```shell
41
-
spring.ai.bedrock.aws.region=us-east-1
42
-
43
-
spring.ai.bedrock.aws.access-key=YOUR_ACCESS_KEY
44
-
spring.ai.bedrock.aws.secret-key=YOUR_SECRET_KEY
45
-
```
46
-
47
-
The `region` property is compulsory.
48
-
49
-
The AWS credentials are resolved in the following this order:
50
-
51
-
* Spring-AI Bedrock `spring.ai.bedrock.aws.access-key` and `spring.ai.bedrock.aws.secret-key` properties.
52
-
* Java System Properties - `aws.accessKeyId` and `aws.secretAccessKey`
53
-
* Environment Variables - `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`
54
-
* Web Identity Token credentials from system properties or environment variables
55
-
* Credential profiles file at the default location (`~/.aws/credentials`) shared by all AWS SDKs and the AWS CLI
56
-
* Credentials delivered through the Amazon EC2 container service if `AWS_CONTAINER_CREDENTIALS_RELATIVE_URI`" environment variable is set and security manager has permission to access the variable,
57
-
* Instance profile credentials delivered through the Amazon EC2 metadata service or set the `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables.
58
-
59
-
### Enable selected Bedrock model
60
-
61
-
> **NOTE**: By default all models are disabled. You have to enable the chosen Bedrock models explicitly, using the `spring.ai.bedrock.<model>.<chat|embedding>.enabled=true` property.
62
-
63
-
Here are the supported `<model>` and `<chat|embedding>` combinations:
0 commit comments