filmov
tv
Develop and Host a Slack API Bot on AWS EC2 Using OpenAI and Python: Step-by-Step Guide

Показать описание
Hey all in this tutorial I will show you how to build a slack bot from start to finish including hosting our bot so it can be on 24/7. We will be using openai's GPT-3.5-TURBO following the new api structure. We will be writing our code in python.
Below are links to openai documentation, my python code, and linux commands used in EC2
AWS EC2 Linux commands:
yum update
yum install python3-pip
python3 -m pip install openai
python3 -m pip install slack_bolt
Inside nano press Ctrl+S to save
and Ctrl+X to exit it
export OPENAI_API_KEY=sk-youopeanikey
To enter in permanent environment variables: nano ~/.bashrc
To permanently save it run: source ~/.bashrc
0:00 Intro
0:25 Quick Demo
1:00 Slack App: Setting up Slack App
1:30 Slack App: Adding OAuth Scopes
2:00 Demo of Slack bot sending chart images
2:30 Slack App: Installing to workspace
2:50 Slack App: Enable Socket Mode
3:20 Slack App: Set Up Event Subscription
4:00 Python: Import slack_bolt
4:30 Python: Getting Bot Token
4:55 Python: __name__ setting up socket mode Token
5:10 Python: Event Listening Mentions
6:25 Slack: Adding bot as an integration to Slack
7:00 Slack: Testing Hello World
7:30 Python: Get the User Message
8:30 Terminal: Updating OpenAi Package
9:00 Python: OpenAi Python Code
10:30 OpenAi API Key Setup
11:00 Bug Fixes
12:00 Testing AI Bot
12:50 AWS: Creating an EC2 Instance
14:30 AWS: Connecting to EC2 Instance
18:00 AWS: Making the Slack Bot Run Continuously
#openai #awsec2 #awstutorial #pythontutorial
Below are links to openai documentation, my python code, and linux commands used in EC2
AWS EC2 Linux commands:
yum update
yum install python3-pip
python3 -m pip install openai
python3 -m pip install slack_bolt
Inside nano press Ctrl+S to save
and Ctrl+X to exit it
export OPENAI_API_KEY=sk-youopeanikey
To enter in permanent environment variables: nano ~/.bashrc
To permanently save it run: source ~/.bashrc
0:00 Intro
0:25 Quick Demo
1:00 Slack App: Setting up Slack App
1:30 Slack App: Adding OAuth Scopes
2:00 Demo of Slack bot sending chart images
2:30 Slack App: Installing to workspace
2:50 Slack App: Enable Socket Mode
3:20 Slack App: Set Up Event Subscription
4:00 Python: Import slack_bolt
4:30 Python: Getting Bot Token
4:55 Python: __name__ setting up socket mode Token
5:10 Python: Event Listening Mentions
6:25 Slack: Adding bot as an integration to Slack
7:00 Slack: Testing Hello World
7:30 Python: Get the User Message
8:30 Terminal: Updating OpenAi Package
9:00 Python: OpenAi Python Code
10:30 OpenAi API Key Setup
11:00 Bug Fixes
12:00 Testing AI Bot
12:50 AWS: Creating an EC2 Instance
14:30 AWS: Connecting to EC2 Instance
18:00 AWS: Making the Slack Bot Run Continuously
#openai #awsec2 #awstutorial #pythontutorial
Комментарии