Skip to content
Closed

bedrock #4365

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ To clone it you have to either:

## Building

You'll have the best luck compiling against Java 17.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will state simply, build using java 17


To build with running unit tests

```shell
Expand Down Expand Up @@ -101,9 +103,10 @@ A full integration test is done twice a day in the [Spring AI Integration Test R
One way to run integration tests on part of the code is to first do a quick compile and install of the project

```shell
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
./mvnw -DskipTests -Dmaven.javadoc.skip=true -Ddisable.checks=true spring-javaformat:apply clean install
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding 'disable.checks' just shifts the checksytyle fixes to the person who merges the PR, so can't exclude it.

```
Then run the integration test for a specific module using the `-pl` option

```shell
./mvnw verify -Pintegration-tests -pl spring-ai-spring-boot-testcontainers
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ public class BedrockCohereEmbeddingProperties {

public static final String CONFIG_PREFIX = "spring.ai.bedrock.cohere.embedding";

/**
* whether Cohere functionality should be enabled.
*/
private boolean enabled;

/**
* Bedrock Cohere Embedding generative name. Defaults to
* 'cohere.embed-multilingual-v3'.
Expand Down Expand Up @@ -62,4 +67,12 @@ public void setOptions(BedrockCohereEmbeddingOptions options) {
this.options = options;
}

public boolean isEnabled() {
return enabled;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,19 @@
* Configuration properties for Bedrock Converse.
*
* @author Christian Tzolov
* @author Josh Long
* @since 1.0.0
*/
@ConfigurationProperties(BedrockConverseProxyChatProperties.CONFIG_PREFIX)
public class BedrockConverseProxyChatProperties {

public static final String CONFIG_PREFIX = "spring.ai.bedrock.converse.chat";

/**
* whether Bedrock functionality should be enabled.
*/
private boolean enabled;

@NestedConfigurationProperty
private BedrockChatOptions options = BedrockChatOptions.builder().temperature(0.7).maxTokens(300).build();

Expand All @@ -44,4 +50,12 @@ public void setOptions(BedrockChatOptions options) {
this.options = options;
}

public boolean isEnabled() {
return enabled;
}

public void setEnabled(boolean enabled) {
this.enabled = enabled;
}

}
Loading