Skip to content

Commit

Permalink
feat: add bedrock runtime agent for knowledge base (#2651)
Browse files Browse the repository at this point in the history
* add bedrock runtime agent for knowledge base

Signed-off-by: yuye-aws <[email protected]>

* update unit test

Signed-off-by: yuye-aws <[email protected]>

---------

Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws authored Jul 18, 2024
1 parent 6c8720e commit 226e53f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ public void validateConnectorURL_Invalid() {
HttpConnector connector = createHttpConnector();
connector.validateConnectorURL(Arrays.asList("^https://runtime\\.sagemaker\\..*[a-z0-9-]\\.amazonaws\\.com/.*$",
"^https://api\\.openai\\.com/.*$",
"^https://api\\.cohere\\.ai/.*$"));
"^https://api\\.cohere\\.ai/.*$",
"^https://bedrock-agent-runtime\\\\..*[a-z0-9-]\\\\.amazonaws\\\\.com/.*$"
));
}

@Test
public void validateConnectorURL() {
HttpConnector connector = createHttpConnector();
connector.validateConnectorURL(Arrays.asList("^https://runtime\\.sagemaker\\..*[a-z0-9-]\\.amazonaws\\.com/.*$",
"^https://api\\.openai\\.com/.*$",
"^https://bedrock-agent-runtime\\\\..*[a-z0-9-]\\\\.amazonaws\\\\.com/.*$",
"^" + connector.getActions().get(0).getUrl()));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ private MLCommonsSettings() {}
"^https://runtime\\.sagemaker\\..*[a-z0-9-]\\.amazonaws\\.com/.*$",
"^https://api\\.openai\\.com/.*$",
"^https://api\\.cohere\\.ai/.*$",
"^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$"
"^https://bedrock-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$",
"^https://bedrock-agent-runtime\\..*[a-z0-9-]\\.amazonaws\\.com/.*$"
),
Function.identity(),
Setting.Property.NodeScope,
Expand Down

0 comments on commit 226e53f

Please sign in to comment.