From the course: Building Applications Using Amazon Bedrock

Unlock the full course today

Join today to access over 24,200 courses taught by industry experts.

Coding: Adding Streamlit integration - Part 2

Coding: Adding Streamlit integration - Part 2 - Amazon Bedrock Tutorial

From the course: Building Applications Using Amazon Bedrock

Coding: Adding Streamlit integration - Part 2

- [Instructor] Okay, so now we're going to pick up where we left off and complete our code. If you're just starting from this video, 02_07b, that beginning folder will have the version of the code where we stopped in the last video and now let's continue on. So we're going to configure the prompt template. So we have prompt_template here, create that variable. That's equal to prompt_template. And we're going to say from_template, and we're going to pass in here my_template, which we specified right above. Now, we're going to configure our chain. So we're going to use here retrieval QA chain. So we're going to say QA = RetrievalQA.from_chain_type. And we're going to specify a few parameters here. We have llm = llm that we had created earlier on. Next, we have the chain_type. It's going to be a stuff and specify our retriever to be the AmazonKnowledgeBaseRetriever we had defined initially. Scroll back here and this is…

Contents