GithubHelp home page GithubHelp logo

englishteacherslackbot's Introduction

EnglishTeacherBot

ChatGPT API を使って英語の添削をする Slack Bot

Bot Answer

メンションした文章に対して修正をし、添削のポイントも返す。

Setting (AWS)

AWS Systems Manager に以下を事前に登録する

src/lambda ディレクトリにて以下のコマンドを実行し、ライブラリをインストールする

$ npm install

CDK で AWS 環境へデプロイする

初回のみ

$ cdk bootstrap

デプロイ

$ cdk deploy

Setting (Slack)

Slack Appの作成:

  1. SlackApi your apps にアクセスし、右上の「Create New App」ボタンをクリックして、 From Scratch の新しいアプリを作成します。
  2. アプリ名と開発ワークスペースを入力し、「Create App」をクリックします。

ボット機能の追加:

  1. アプリの管理ページ(Basic Information)のDisplay Informationで、ボットの表示名とデフォルトのアイコンを設定します。

ボットへの権限の追加:

  1. 左サイドバーの「OAuth & Permissions」をクリックします。
  2. OAuth Tokens for Your Workspace でトークンを取得します。(AWS Systems Manager にこのトークンを設定します。)
  3. 「Scopes」セクションで、 app_mentions:readchat:write を追加します。

ボットのイベント設定:

  1. アプリ管理ページで、左サイドバーの「Event Subscriptions」をクリックします。
  2. 「Enable Events」をオンにし、「Request URL」にボットのエンドポイントURL(API GatewayのURL)を入力します。
  3. 「Subscribe to bot events」の中で「Add Bot User Event」をクリックし、app_mentionイベントを追加します。これにより、ボットがメンションされたときに通知を受け取ることができます。
  4. 変更内容を保存します。

englishteacherslackbot's People

Contributors

syobochim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.