Integrating Foundation Models into Your Code with Amazon Bedrock
ฝัง
- เผยแพร่เมื่อ 21 ก.ค. 2024
- 🌟 Get started today with Amazon Bedrock: aws.amazon.com/bedrock/
Discover Amazon Bedrock and learn how to integrate generative AI models from leading AI startups and Amazon into your applications. In this video, AWS Senior Developer Advocate Mike Chambers steps through how to use Boto3, the Python SDK for AWS, to make text generations with models such as Anthropic Claude and A121 Labs Jurassic. To follow along you will need the latest Boto3 library, and AWS account, and permissions to call the Amazon Bedrock service.
Follow AWS Developers:
👾 Twitch: / aws
🐦 Twitter: / awsdevelopers
💻 LinkedIn: / aws-developers
Follow Mike!
🐦 Twitter: / mikegchambers
💻 LinkedIn: / mikegchambers
00:00 Introduction
00:23 Generation with Jurassic
05:13 Generation with Claude
08:50 Invoke with Response Stream
10:58 Outro
#amazonbedrock #generativeai #aws - วิทยาศาสตร์และเทคโนโลยี
This is a fantastic and very useful demo of Amazon Bedrock capabilities. Thank you for posting this!
The great thing you've done is make complex technology seem like a piece of cake. It's like a magic. Thanks
That's AWSome to hear! 😀
Fantastic video Mike! very clear, easy to follow along. Exciting!
You’re incredible! Can’t wait to see more from you.
Crisp explanation Mike! Well done!
Nice explanation. Well done, Mike!
Such a clear and concise explanation. Thank you
We're so glad you enjoyed! 😀 🙌
Excellent Mike, you make it look very simple. quite insightful nuggets.
That's true! 😀 🙌
Great introduction to this very promising new service! Thanks Mike
That's AWSome to hear! So glad you enjoyed! 😀 🙌
This is super useful Mike thanks.
Thanks for video. Really interested in fine tuning for custom models too
Awesome Mike ... Looks very simple ... If you have other use cases as to what base models to use for what kind of prompts it will be really very useful so that we know whether we should use AI21Lab, Anthropic or Amazon etc
Thanks. Great idea for a video.
'Really loving this easy-to-follow content, great job!
That's AWSome to hear! 😀
Excellent video. Thumbs up
Fantactic one. As usual awesome way of explaining from Mike !!!
Absolutely, agree! 🤩 🤝 ❤️
Great job Mike!
This is one hell of a video. Awesome 😎 thank you!
That's really great to hear! You're welcome, Khalid! 😀 🙌
Hi Mike, I loved how you presented this demo with python. Can you or anyone please share documentation with Javascript, I am about to create something using Bedrock and JS
Great Video, Well Done Mike!
awesome tutorial, thank you
Hi - I successfully followed this example. But now I want to continue the conversation thread. How can I do that?
Thank you -- it is very useful and helpful !!
That's great to hear! You're welcome! 😀
Very cool, is there .NET equivalent anywhere? Polgot notebook or something along those lines. Most examples seem to be in Python, can convert it granted but just after a helpful starter.
Nicely explained!
Do you have an option to fine tune the models (fine tunable) using PEFT or other techniques?
Hi there! If you'd like, feel free to ask our community of experts on re:Post for insight: go.aws/aws-repost. 👥 For additional options to get help, please check in, here: go.aws/get-help. 🛠️ ^LD
Has anyone tried that?
Could not resolve the foundation model from the provided model identifier.
Does not work for me even though I have access to the model according to aws
Hi, Daniel. 👋 We have a re:Post community of industry experts eager to help with these technical questions. You can reach out to them through this link, here: go.aws/aws-repost. 🗒️ ^ZP
This video is a bit outdated now.
First, they have moved "view API request" button into the three dots at top right corner.
Second, the "propmt" in body of kwargs has been changed to "inputText". Or maybe just because I'm using modal , not the ?
Yes, there have been some updates since this was published! We're working on new videos, so that you're up-to-date with all things Amazon Bedrock :)
I'm confused, is there an enviornment file somewhere where you set the keys that points to your Bedrock instance?
Hello, Nithin! 👋 I've shared your question internally with our team for review. In the meantime, you can find more information on Amazon Bedrock here: go.aws/3rBVcbb. ✅ ^MO
This is really nice and detailed explanation. do we also need the model access for the play ground to explore the bedrock service ??
Thanks for the inquiry. The information regarding Model Access can be found in the Amazon Bedrock docs here: go.aws/3OofT2j. Hope this helps. ^BD
More video with Mike please!!!!
Yes!!!!!!
The ‘View API Request’ option shows the AWS CLI version. Has the json version been removed?
Sorry for any disconnect here. I found you an official doc that might provide further context into Amazon Bedrock API requests: go.aws/3XSaxSE. If that's not helpful, I'd recommend reaching our to our community of experts on re:Post, for additional technical insight: go.aws/aws-repost. ^AD
Very valuable tutorial Mike! But one piece is missing, where and how did you connect the API amazon token/profile?
Hi, Tomas. Our re:Post community may be able to assist on this one. Be sure to post your question, here: go.aws/3PZwmeq. ^CM
did you figure it out?
have u tried changing the AWS account region? follow which profile region u install the bedrock@@user-yc4dy5ke1m
The Bedrock UI has changed. The "View API request" button has been removed. Any ideas for how to get a properly formatted JSON body?
Its hidden behind the three dots now, a little bit higher
Where do you authenticate (with your own account's credentials) in this scenario?
Hi! 👋 While we cannot provide you with an answer immediately, we've reached out to our service team on your behalf. 👍 We'll get back to you as soon as we hear back from them. ^RF
Is it free to use in our applications?
I have been struggling for 3 days to find how to add Knowledge Base from sidebar. Can someone help me with this issue?
Sorry to hear this, Edgar. This doc can help you out: go.aws/3LQVktX. If you need additional help, reach out using the resources found here: go.aws/tech-support. 🧰 ^RS
Since Amazon's support is unhelpful, the Knowledge Base (and Agents) are currently in preview. You like do NOT have access to it yet.
I was able to follow the tutorial until the part about the "View API request" button that does not appear for me.
How else can I access the API request?
Oh you are right! The team have moved the button, and swapped it to the CLI format. You can find "View API request" under the three dots menu in the top right of the playground. If you would like to see JSON like I used in the video, then you can find that under "Base models" then select the model, and scroll down. Things move so fast!
@@mikegchambers Now I can see it, thank you very much for answering my question!
thanks!
Im using ClaudeV2 but I cant find how many tokens Im using per request, in Jurassic it came with the response, how does it work for ClaudeV2?
Hi there! I found this announcement that details Claude 2 can take up to 100,000 tokens in each prompt: go.aws/3QHZW8S. I hope this helps, but if you need help, feel free to check out AWS re:Post for input from our community: go.aws/aws-repost. ^RM
Thanks for the support@@awssupport . I know it can generate text using up to 100k tokens, but in my requests I'm using it limited to 4k and I'm pretty sure it's not consuming 4k each time it generates a response to me correct? Like in Jurassic I was able to limite max amount of tokens to 4k and in it's response it was saying it "only" used 3.2k tokens to generate the response. I was wondering how could I get the exactly amount of tokens used in the Claude V2 response?
Hello! Unfortunately I wasn't able to find any info specific to viewing token usage in your Claude response. However, I suggest asking our community of engineers on our Amazon Bedrock forum on re:Post for additional help: go.aws/aws-repost. ^RN
#amazonbedrock #aws Can we use RAG kind of architecture with foundation models. How to create embeddings .Does Amazon Bedrock provides capabilities to create embeddings vector database and then that index can be used to retrieve information and that info to be given to LLM to generate more relevant content.
Hi Vikas, I think this AWS Bedrock overview website could benefit you! Specifically, if you scroll down to "Benefits" you may find answers to your questions. Another good option is re:Post: go.aws/aws-repost. You can view and post to our AWS industry experts in a forum type environment. 💻 ^DC
Check out the Knowledge base feature in Bedrock .can't remember if it's GA or not.
How to implement the claude api in javascript
Hello Ashish! 👋 For assistance with your query, you're welcome to post it on our re:Post community of experts, here: go.aws/aws-repost. ^RZ
thx!
cool stuff.
Wonderful walkthrough, but where did you setup the APIs?
Hi, Diptesh! 😊 You can access the Amazon Bedrock API using the AWS Command Line Interface (AWS CLI), an AWS SDK, or a SageMaker Notebook. Check out this handy document: go.aws/469gdsF. If you still need some tech assistance, see our re:Post article for some options: go.aws/tech-support. 🤓👍 ^RW
I was asking the same!
This is great
Thank you!👍
Thanks, but i got error: Unknown service: 'bedrock-runtime'
Sorry to hear, Orel! You may want to share details on AWS re:Post: go.aws/aws-repost. Our community of experts & enthusiasts can look over your configuration to help troubleshoot. 🤝 ^RM
Hey! Thanks for trying out the code. Can you make sure you’re using the very latest version of Boto3. Let me know if you’re still having problems then.
@@mikegchambers I am having the same exact error. I have boto3 1.28.57 (Windows)
I believe the correct code should be:
response = client.invoke_model(**kwargs)
instead of:
response = bedrock_runtime.invoke_mode(**kwargs)
Boto3 packages were updated yesterday afternoon. Once you update to latest, it works fine.
while running this code i got unable to locate credentials error ,how to resolve it .please suggest.
Terribly sorry to hear you're facing this issue. 😔 We highly recommend reaching out to our community of experts & engineers to get help with this. 🤓 Please do so, here: go.aws/aws-repost. 👈 ^RF
can we use Aws Bedrock fms with free tier account@@awssupport
Currently, there is no Free Tier offering for this service. 😔 To learn more out our Bedrock service pricing, check out this page: go.aws/3TlVdL4. 👈 ^RF
Thank you for the info👍@@awssupport
It's our pleasure! 🤗 ^RF
Hi pls provide github resource
Hi there! You'll find our Amazon Bedrock workshop, here: go.aws/3PUK4PE. I'd also recommend looking through our resources to get started: go.aws/3FfIimp. ^RM
@@awssupport there is no code nor ipynb
Sorry to hear about this trouble, Sergiy. Here's a link that might be just what you need: go.aws/3ZCiU3k. 🔗 If not, feel free to share additional details on what you're looking for. ^AK