-
Notifications
You must be signed in to change notification settings - Fork 337
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
Feature: Add Amazon Bedrock Agents support #554
base: main
Are you sure you want to change the base?
Conversation
…nto feat_bedrock_agents
…nto feat_bedrock_agents
…nto feat_bedrock_agents
…nto feat_bedrock_agents
…i-llm-chatbot into feat_bedrock_agents
…nto feat_bedrock_agents
@@ -0,0 +1,67 @@ | |||
# Support additional models |
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 doc is possibly a copy of https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/lib/model-interfaces/langchain/README.md (or a work in progress?)
Is the content applicable?
lib/model-interfaces/bedrock-agents/functions/request-handler/adapters/bedrock/base.py
Outdated
Show resolved
Hide resolved
lib/model-interfaces/bedrock-agents/functions/request-handler/adapters/bedrock/base.py
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,31 @@ | |||
import os |
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.
Is this file needed? (Could be extended to support open ai agent equivalent?)
lib/model-interfaces/bedrock-agents/functions/request-handler/index.py
Outdated
Show resolved
Hide resolved
"interface": ModelInterface.AGENT.value, | ||
"ragSupported": False, | ||
"agentId": a["agentId"], | ||
"agentVersion": "TSTALIASID", |
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 is this value?
@@ -86,3 +88,24 @@ export class SharedAssetBundler extends Construct { | |||
return Code.fromBucket(asset.bucket, asset.s3ObjectKey); | |||
} | |||
} | |||
|
|||
class BuildImageProvider extends Construct { |
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.
👍
@@ -0,0 +1,257 @@ | |||
{ |
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.
I believe this file is auto generated by the weather lambda? Is there a cli command to do this?
import os | ||
import requests | ||
from typing import Annotated | ||
import pandas as pd |
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.
nip: I believe pandas is large and would cause cold start due to numpy. I would remove this dependency if it's easy (I believe Panda has smaller managed lambda layers)
}:017000801446:layer:AWSLambdaPowertoolsPythonV2:58` | ||
); | ||
|
||
const placeIndex = new geo.CfnPlaceIndex(this, "place-index", { |
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.
nit: other classes use this case for construct ids
const placeIndex = new geo.CfnPlaceIndex(this, "place-index", { | |
const placeIndex = new geo.CfnPlaceIndex(this, "PlaceIndex", { |
@@ -349,7 +360,7 @@ export default function ChatInputPanel(props: ChatInputPanelProps) { | |||
const { name, provider } = OptionsHelper.parseValue( | |||
state.selectedModel.value | |||
); | |||
|
|||
console.log(state.selectedModel.value); |
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.
console.log(state.selectedModel.value); |
debug code?
|
||
const agent = new bedrock.Agent(this, "weather-agent", { | ||
foundationModel: | ||
bedrock.BedrockFoundationModel.ANTHROPIC_CLAUDE_INSTANT_V1_2, |
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.
Better to switch to Sonnet 3 or Haiku now
{ | ||
type: "confirm", | ||
name: "bedrockAgents", | ||
message: "Do you want to deploy a sample Bedrock Agent?", |
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 add something like (Agent with access to workspace and weather .. backed by Claude [insert model])
just to give an idea of the out of the box one
Adding Bedrock Agents integration will be a great new feature. Is the intent for the identified issues/feedback to be addressed and have this merged into main? It's been a couple of months so not sure if it's going to progress. I'm very keen to use this but not sure if I should try and merge this incomplete version or wait for it to progress into main. |
Issue #, if available:
#277
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.