Git Product home page Git Product logo

lineworks-assistant-bot's Introduction

LINE WORKS アシスタントボット

OpenAIのGPTをベースとした、LINE WORKS上で動くチャットボット。

Description

OpenAIのChat APIを用いたGPTベースのチャットボット。

そして、Function Callingによって、予定登録に関連する要求があればカレンダーに自動的に登録してくれる、アシスタント機能を実装。

Features

  • チャット機能 (GPTによって回答を生成)
  • カレンダー予定追加機能 (Function Calling利用)

Architecture

AWSのサーバーレス構成。

  • AWS Lambda
  • AWS DynamoDB

Get started

Prepare

LINE WORKS APIを使うための認証情報を作成。

https://dev.worksmobile.com/jp/reference/authorization-sa?lang=ja

OpenAIのAPI keyを生成 (Azure OpenAI Serviceにも対応)

https://platform.openai.com/account/api-keys

Workspace with Docker

docker compose up -d
docker compose exec workspace bash

Set env

export OPENAI_API_KEY=sk-xxxxxxxxxxx
export OPENAI_ORGANIZATION_ID=org-xxxxxxxx
export OPENAI_MODEL=gpt-4

export LW_API_BOT_ID=1111111
export LW_API_BOT_SECRET=xxxxxxxxxx
export LW_API_CLIENT_ID=xxxxxxxx
export LW_API_CLIENT_SECRET=xxxxxx
export LW_API_SERVICE_ACCOUNT=xxxxx@xxxxxxx
export LW_API_PRIVATEKEY="-----BEGIN PRIVATE KEY-----
xxxxxxxxxxxxxxxxxxxxxxxx
-----END PRIVATE KEY-----"

Deploy

sls deploy --param="author={author}"  --stage dev --aws-profile {profile}

lineworks-assistant-bot's People

Contributors

mmclsntr 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.