-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
842 aws bedrock connector #2832
Conversation
connectors/aws/aws-bedrock/pom.xml
Outdated
<properties> | ||
<maven.compiler.source>21</maven.compiler.source> | ||
<maven.compiler.target>21</maven.compiler.target> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
</properties> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont we inherit it from the parent?
inputVariables = {"authentication", "configuration", "action", "data"}, | ||
type = "io.camunda:aws-bedrock:1") | ||
@ElementTemplate( | ||
id = "io.camunda.connectors.AWSBEDROCK.v1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id = "io.camunda.connectors.AWSBEDROCK.v1", | |
id = "io.camunda.connectors.aws.bedrock.v1", |
bundle/default-bundle/src/test/resources/application.properties
Outdated
Show resolved
Hide resolved
...ors/aws/aws-bedrock/src/main/java/io/camunda/connector/aws/bedrock/core/BedrockExecutor.java
Outdated
Show resolved
Hide resolved
public class PreviousMessage { | ||
private String message; | ||
private ConversationRole role; | ||
|
||
public PreviousMessage(String message, ConversationRole role) { | ||
this.message = message; | ||
this.role = role; | ||
} | ||
|
||
public PreviousMessage() {} | ||
|
||
public String getMessage() { | ||
return message; | ||
} | ||
|
||
public void setMessage(String message) { | ||
this.message = message; | ||
} | ||
|
||
public ConversationRole getRole() { | ||
return role; | ||
} | ||
|
||
public void setRole(ConversationRole role) { | ||
this.role = role; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we create a simple data record like this:
public record Message(String text, String role) {}
We should try to avoid serializing external data models like in this case ConversationRole
.
|
||
import software.amazon.awssdk.services.bedrockruntime.model.ConversationRole; | ||
|
||
public class PreviousMessage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be converted to a record
?
binding = @TemplateProperty.PropertyBinding(name = "data.messagesHistory")) | ||
@Valid | ||
@JsonSetter(nulls = Nulls.SKIP) | ||
private List<PreviousMessage> messagesHistory = new ArrayList<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about messages
?
binding = @TemplateProperty.PropertyBinding(name = "data.newMessage")) | ||
@Valid | ||
@NotBlank | ||
private String newMessage; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nextMessage
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, some minor comments.
…ock (checkpoint 2)
…ock (checkpoint 3)
a2cf9b6
to
4273b14
Compare
...aws/aws-bedrock/src/main/java/io/camunda/connector/aws/bedrock/BedrockConnectorFunction.java
Show resolved
Hide resolved
@ElementTemplate.PropertyGroup(id = "invokeModel", label = "Invoke Model"), | ||
@ElementTemplate.PropertyGroup(id = "converse", label = "Converse"), | ||
}, | ||
documentationRef = "https://docs.camunda.io/docs/", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be update with the future doc link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments, LGTM 🥇
...ctors/aws/aws-bedrock/src/main/java/io/camunda/connector/aws/bedrock/model/ConverseData.java
Outdated
Show resolved
Hide resolved
import software.amazon.awssdk.services.bedrockruntime.model.Message; | ||
|
||
@TemplateSubType(id = "converse", label = "Converse") | ||
public final class ConverseData implements RequestData { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep in my that if we don't override toString
we might leak information from nextMessage
or the previous messages.
Not sure it's an issue for this connector, it's more a FYI :) We usually do that for credentials etc
* feat(aws-bedrock): new outbound connector implementation for aws bedrock * feat(aws-bedrock): new outbound connector implementation for aws bedrock (checkpoint 2) * feat(aws-bedrock): new outbound connector implementation for aws bedrock (checkpoint 3) * feat(aws-bedrock): setting application.properties as it was before (checkpoint 4) * feat(aws-bedrock): fix comments from PR (checkpoint 5) * feat(aws-bedrock): fix indent (checkpoint 6) * feat(aws-bedrock): fix last minor comment (checkpoint 7)
Description
Related issues
closes https://github.com/camunda/team-connectors/issues/842