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.38k stars 591 forks source link

Fix: cannot import `utils`, fix with boto3, bedrock client and runtime, improve docs #159

Closed Dinuda closed 5 months ago

Dinuda commented 8 months ago

Issue #, if available:

Description of changes:

  1. Add clear instructions on how to setup aws service role, cli user and user profile.
  2. Fix: from utils import bedrock - There was no library named utils, there is no pip package for bedrock utils, to make it work you need to manually copy paste files into site_packages. Ref: Issue 31
    • use 'boto3.client()` instead
  3. According to instructions from Issue 31, the utils do not contain invoke_model.
    • use boto3.runtime() -bedrock_runtime = boto3.client('bedrock-runtime') By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Dinuda commented 8 months ago

Hi guys 👋 , can I get a review on this?

w601sxs commented 5 months ago

Closing this based on new updates and testing on the latest workshop - https://github.com/aws-samples/amazon-bedrock-workshop. Please do resubmit if it still exists in the new workshop.