Skip to content

Commit 25f91c3

Browse files
wmz7yeartzolov
authored andcommitted
Add AWS Bedrock Amazon Titan Text Premier model support
1 parent 3497a1e commit 25f91c3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,12 @@ public enum TitanChatModel {
275275
/**
276276
* amazon.titan-text-express-v1
277277
*/
278-
TITAN_TEXT_EXPRESS_V1("amazon.titan-text-express-v1");
278+
TITAN_TEXT_EXPRESS_V1("amazon.titan-text-express-v1"),
279+
280+
/**
281+
* amazon.titan-text-premier-v1:0
282+
*/
283+
TITAN_TEXT_PREMIER_V1("amazon.titan-text-premier-v1:0");
279284

280285
private final String id;
281286

models/spring-ai-bedrock/src/test/java/org/springframework/ai/bedrock/titan/BedrockTitanChatClientIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public static class TestConfiguration {
205205

206206
@Bean
207207
public TitanChatBedrockApi titanApi() {
208-
return new TitanChatBedrockApi(TitanChatModel.TITAN_TEXT_EXPRESS_V1.id(),
208+
return new TitanChatBedrockApi(TitanChatModel.TITAN_TEXT_PREMIER_V1.id(),
209209
EnvironmentVariableCredentialsProvider.create(), Region.US_EAST_1.id(), new ObjectMapper(),
210210
Duration.ofMinutes(2));
211211
}

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock/bedrock-titan.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The prefix `spring.ai.bedrock.titan.chat` is the property prefix that configures
8080
|====
8181

8282
Look at the https://github.com/spring-projects/spring-ai/blob/4839a6175cd1ec89498b97d3efb6647022c3c7cb/models/spring-ai-bedrock/src/main/java/org/springframework/ai/bedrock/titan/api/TitanChatBedrockApi.java#L220[TitanChatBedrockApi#TitanChatModel] for other model IDs.
83-
Supported values are: `amazon.titan-text-lite-v1` and `amazon.titan-text-express-v1`.
83+
Supported values are: `amazon.titan-text-lite-v1`, `amazon.titan-text-express-v1` and `amazon.titan-text-premier-v1:0`.
8484
Model ID values can also be found in the https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids-arns.html[AWS Bedrock documentation for base model IDs].
8585

8686
TIP: All properties prefixed with `spring.ai.bedrock.titan.chat.options` can be overridden at runtime by adding a request specific <<chat-options>> to the `Prompt` call.

0 commit comments

Comments
 (0)