Feature: AWS bedrock generator#1462
Conversation
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
|
DCO Assistant Lite bot All contributors have signed the DCO ✍️ ✅ |
|
I have read the DCO Document and I hereby sign the DCO |
|
recheck |
|
Claude 3 sonnet is not supported so test is failing. I'm open to change the model in pytest |
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
|
Hi @leondz the test errors should be fixed now. I didn't include the .rst file |
jmartin-tech
left a comment
There was a problem hiding this comment.
Thank you, this is a great addition.
Comments are based on static code review. Full integration testing is still in queue.
|
added Value Error logic. It was deleted from previous commit |
jmartin-tech
left a comment
There was a problem hiding this comment.
Some minor additional thoughts on UX and supported message roles. I suspect these may result in less confusion if this generator is utilized with complex configurations.
Co-authored-by: Jeffrey Martin <jmartin@Op3n4M3.dev> Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
Co-authored-by: Jeffrey Martin <jmartin@Op3n4M3.dev> Signed-off-by: Fabrizio Rocco <34063386+fabriziorocco@users.noreply.github.com>
|
I tried to use the base class's |
jmartin-tech
left a comment
There was a problem hiding this comment.
This looks complete, thank you!
| turn_list = [ | ||
| {"role": turn.role, "content": [{"text": turn.content.text}]} | ||
| for turn in conversation.turns | ||
| ] |
There was a problem hiding this comment.
Sorry for the misdirection, I see this is a slightly different format than the what is used in the base class.
|
Thank you Fabrizio! |
Adding support for the Bedrock Generator. Adding this because customer are requesting to test LLM on AWS (focus on Amazon Nova models).
Bedrock use boto3 SDK and Converse API to make requests. Credentials are managed using AWS Credentials or new Bedrock API Key (recently introduced).
Verification
List the steps needed to make sure this thing works
python -m garak --model_type bedrock --model_name nova-proIf you are opening a PR for a new plugin that targets a specific piece of hardware or requires a complex or hard-to-find testing environment, we recommend that you send us as much detail as possible.
Complex Software Examples:
No specific hardware requirements