Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
ChatGPT in SlackでAI Slackbotを楽しく運用する
Search
iwamot
PRO
September 13, 2023
Technology
1
660
ChatGPT in SlackでAI Slackbotを楽しく運用する
2023-09-14
みんなのPython勉強会#97
https://startpython.connpass.com/event/294703/
iwamot
PRO
September 13, 2023
Tweet
Share
More Decks by iwamot
See All by iwamot
これがLambdaレス時代のChatOpsだ!実例で学ぶAmazon Q Developerカスタムアクション活用法
iwamot
PRO
8
1.4k
Developer Certificate of Origin、よさそう
iwamot
PRO
0
29
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた CODT 2025 クロージングイベント版
iwamot
PRO
1
110
復号できなくなると怖いので、AWS KMSキーの削除を「面倒」にしてみた
iwamot
PRO
3
88
IPA&AWSダブル全冠が明かす、人生を変えた勉強法のすべて
iwamot
PRO
14
11k
2年でここまで成長!AWSで育てたAI Slack botの軌跡
iwamot
PRO
4
1.1k
名単体テスト 禁断の傀儡(モック)
iwamot
PRO
1
580
クォータ監視、AWS Organizations環境でも楽勝です✌️
iwamot
PRO
2
590
Cline、めっちゃ便利、お金が飛ぶ💸
iwamot
PRO
22
22k
Other Decks in Technology
See All in Technology
Haskell を武器にして挑む競技プログラミング ─ 操作的思考から意味モデル思考へ
naoya
7
1.6k
AI時代のワークフロー設計〜Durable Functions / Step Functions / Strands Agents を添えて〜
yakumo
3
580
日本Rubyの会: これまでとこれから
snoozer05
PRO
3
140
Amazon Quick Suite で始める手軽な AI エージェント
shimy
0
250
[デモです] NotebookLM で作ったスライドの例
kongmingstrap
0
160
プロンプトやエージェントを自動的に作る方法
shibuiwilliam
13
11k
今年のデータ・ML系アップデートと気になるアプデのご紹介
nayuts
1
510
品質のための共通認識
kakehashi
PRO
4
370
Kiro を用いたペアプロのススメ
taikis
1
230
CARTAのAI CoE が挑む「事業を進化させる AI エンジニアリング」 / carta ai coe evolution business ai engineering
carta_engineering
0
2k
re:Invent2025 コンテナ系アップデート振り返り(+CloudWatchログのアップデート紹介)
masukawa
0
390
Reinforcement Fine-tuning 基礎〜実践まで
ch6noota
0
190
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
61
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
Believing is Seeing
oripsolob
0
8
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Making the Leap to Tech Lead
cromwellryan
135
9.7k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.2k
Rails Girls Zürich Keynote
gr2m
95
14k
Are puppies a ranking factor?
jonoalderson
0
2.3k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.3k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
GraphQLとの向き合い方2022年版
quramy
50
14k
Transcript
ChatGPT in SlackでAI Slackbotを楽しく運用する 2023-09-14 みんなのPython勉強会#97 https://startpython.connpass.com/event/294703/ ENECHANGE株式会社 CTO室 インフラエンジニア兼SRE 岩本隆史
(iwamot)
ChatGPT in Slackとは
OSSのAI Slackbotアプリ https://github.com/seratch/ChatGPT-in-Slack
Slackの瀬良さんが個人で開発 https://www.linkedin.com/in/seratch/
もちろんPythonで実装 https://github.com/seratch/ChatGPT-in-Slack
いろんな環境で実行可能
ローカル環境・Amazon EC2等 # Create an app-level token with connections:write scope
export SLACK_APP_TOKEN=xapp-1-... # Install the app into your workspace to grab this token export SLACK_BOT_TOKEN=xoxb-... # Visit https://platform.openai.com/account/api-keys for this token export OPENAI_API_KEY=sk-... (snip) python -m venv .venv source .venv/bin/activate pip install -r requirements.txt python main.py https://github.com/seratch/ChatGPT-in-Slack/blob/main/README.md
Amazon ECS on AWS Fargate等 (Docker) FROM python:3.11.4-slim-buster as builder
COPY requirements.txt /build/ WORKDIR /build/ RUN pip install -U pip && pip install -r requirements.txt FROM python:3.11.4-slim-buster as app WORKDIR /app/ COPY *.py /app/ RUN mkdir /app/app/ COPY app/*.py /app/app/ COPY --from=builder /usr/local/bin/ /usr/local/bin/ COPY --from=builder /usr/local/lib/ /usr/local/lib/ ENTRYPOINT python main.py https://github.com/seratch/ChatGPT-in-Slack/blob/main/Dockerfile
AWS Lambda + Amazon API Gateway (Serverless Framework) frameworkVersion: '3'
service: slack-chat-gpt-bot provider: name: aws runtime: python3.9 region: us-east-1 ... https://github.com/seratch/ChatGPT-in-Slack/blob/main/serverless.yml
おすすめ記事 ChatGPTとSlack上で会話するアプリを10分で構築しよう(前編:ローカル環境) https://qiita.com/rubita/items/f143f199e20b0310980a ChatGPTとSlack上で会話するアプリを10分で構築しよう(後編:AWS Lambda) https://qiita.com/rubita/items/f8d08552f98cc3b25a1a
ぼくの提案で追加された機能
Azure OpenAIの利用 # To use Azure OpenAI, set the following
optional environment variables according to your environment # default: None export OPENAI_API_TYPE=azure # default: https://api.openai.com/v1 export OPENAI_API_BASE=https://YOUR_RESOURCE_NAME.openai.azure.com # default: None export OPENAI_API_VERSION=2023-05-15 # default: None export OPENAI_DEPLOYMENT_ID=YOUR-DEPLOYMENT-ID https://github.com/seratch/ChatGPT-in-Slack/blob/main/README.md
Function Calling(実験的機能) # Experimental: You can try out the Function
Calling feature (default: None) export OPENAI_FUNCTION_CALL_MODULE_NAME=tests.function_call_example https://github.com/seratch/ChatGPT-in-Slack/blob/main/README.md
Function Callingの利用例
DALL·E 2を使った画像作成
qrcodeライブラリを使ったQRコード作成
Amazon Pollyを使った音声読み上げ
まとめ
運用も開発も楽しいので是非お試しを! https://github.com/seratch/ChatGPT-in-Slack