Skip to content

Commit d3f2a8f

Browse files
wmz7yeartzolov
authored andcommitted
Fix bean name conflicts when using BedrockAnthropic and BedrockAnthropic3 at the same time.
1 parent 8c04b05 commit d3f2a8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/bedrock/anthropic3/BedrockAnthropic3ChatAutoConfiguration.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
* Leverages the Spring Cloud AWS to resolve the {@link AwsCredentialsProvider}.
3636
*
3737
* @author Christian Tzolov
38+
* @author Wei Jiang
3839
* @since 0.8.0
3940
*/
4041
@AutoConfiguration
@@ -46,14 +47,14 @@ public class BedrockAnthropic3ChatAutoConfiguration {
4647

4748
@Bean
4849
@ConditionalOnMissingBean
49-
public Anthropic3ChatBedrockApi anthropicApi(AwsCredentialsProvider credentialsProvider,
50+
public Anthropic3ChatBedrockApi anthropic3Api(AwsCredentialsProvider credentialsProvider,
5051
BedrockAnthropic3ChatProperties properties, BedrockAwsConnectionProperties awsProperties) {
5152
return new Anthropic3ChatBedrockApi(properties.getModel(), credentialsProvider, awsProperties.getRegion(),
5253
new ObjectMapper(), awsProperties.getTimeout());
5354
}
5455

5556
@Bean
56-
public BedrockAnthropic3ChatClient anthropicChatClient(Anthropic3ChatBedrockApi anthropicApi,
57+
public BedrockAnthropic3ChatClient anthropic3ChatClient(Anthropic3ChatBedrockApi anthropicApi,
5758
BedrockAnthropic3ChatProperties properties) {
5859
return new BedrockAnthropic3ChatClient(anthropicApi, properties.getOptions());
5960
}

0 commit comments

Comments
 (0)