aws-samples / amazon-bedrock-workshop

This is a workshop designed for Amazon Bedrock a foundational model service.
https://catalog.us-east-1.prod.workshops.aws/workshops/a4bdb007-5600-4368-81c5-ff5b4154f518/en-US/20-intro
MIT No Attribution
1.39k stars 595 forks source link

No explanation about how to pass in the customized Bedrock endpoint URL in 09_Guardrails notebook #125

Closed hinfsynz closed 5 months ago

hinfsynz commented 10 months ago

Unlike other notebooks which shows how to pass a customized Bedrock boto3 client to the Bedrock class init function as an argument, the sample notebook for 09_Guardrail only invoke a singleton class BedrockBorgModels which seems only takes no argument. This made it unable to use dev/test endpoint.

harelix commented 10 months ago

Good catch! You’re right about the inconsistency with the 09_Guardrail notebook. Funny enough, I was already tinkering with a fix for this. I plan to roll it out (PR) in a couple of days. With the fix, you’ll be able to pass a customized boto3 client just like in the other notebooks, making it easier to use dev/test endpoints.

I’ll drop a message here once the updated version is live. Thanks a bunch for pointing this out!

harelix commented 10 months ago

128 This PR addresses the encapsulation in the '09_Guardrail' sample notebook, wherein the code allowed for the acceptance of a customized boto3 client argument upon initialization, but it was not facilitated in the Jupyter Notebook interface. With the modifications, users can now pass a customized boto3 client to the initialization of the Bedrock Models class within the notebook.

w601sxs commented 5 months ago

Closing this; please refer to the latest bedrock workshop update and reopen if still relevant