AWS Logo
Menu
Build Your Own Advanced AI Chatbot with AWS Bedrock!

Build Your Own Advanced AI Chatbot with AWS Bedrock!

Get ready to create your own powerful AI chatbot using AWS Bedrock. This guide will take you through the steps to build a chatbot that can answer queries anytime, anywhere. Join us in exploring the potential of AI to create innovative solutions! 🫧

Published Nov 8, 2024
Welcome to step-by-step guide on building an advanced AI chatbot using AWS Bedrock. In this post, you'll learn how to create a powerful chatbot that can answer queries anytime, anywhere. Let's dive into the world of AI and explore the limitless possibilities!
And what excites most is you can modify it as per your choice!
Author : Gagan
Linkedin : Connect 😺
Project-Link : Github 🫧

1. Setting Up Your Environment

1.1 Prerequisites Before we start, ensure you have the following:
  • An AWS account
  • AWS CLI configured
  • AWS Bedrock enabled for your account
  • Python 3.6 or later installed
  • Streamlit installed (pip install streamlit)
  • Boto3 installed (pip install boto3)
  • Load environment variables using python-dotenv (pip install python-dotenv)
1.2 AWS Credentials To interact with AWS services, you'll need to set up your AWS credentials. Here's how to configure them:
Note : Make sure aws cli is installed by
You'll be prompted to enter your AWS Access Key ID, Secret Access Key, region, and output format.
In that paste your keys
type πŸ‘‰ us-east-1 in region and JSON in output when asked ( and done )
1.3 Installing Required Python Packages Create a requirements.txt file with the following content and install the dependencies:
then run πŸ‘‡
pip install -r requirements.txt

You will also need Telegram bot TOKEN and Chat ID for sending logs in TELEGRAM ✨
here is how your .env will look like πŸ‘‡
Now here is the code for gagan.py ( main script ) πŸ‘‡
and you can run this script by running
And cool ! Your chat bot is running 🫧

Working Project Screenshots 🌌

Chatbot in White Theme
Bedrock Chatbot ( White Theme )
Bedrock Chatbot ( White Theme )
Bedrock Chatbot ( Dark Theme )
Bedrock Chatbot ( White Theme ) on mobile
Bedrock Chatbot ( White Theme ) Mobile
Oh and you can set the temprature ( creativity of chatbot ) and token ( Output Length ) at run time from sidebar
You can also use SET MODE for change behaviour of Chatbot
Thank You for reading my Post , Take care please fork 🍽️ and Star ⭐the repo it will be really Kind of you ( I have not a job yet haha )
Github ✨
Take care, Bye 🫧
See ya
Β 

Comments