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.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 π«§
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
Β
Β