このプロジェクトは、Nextjs と Nodejs で構築されたルールベースのチャットボットアプリケーションです。日本語の形態素解析にRakutenMAライブラリを使用し、ユーザーとの対話のためのチャットインターフェースを提供します。アプリケーションには、ユーザーの入力の各単語の重要性を決定するために使用されるWeightsデータを管理するための管理ページも含まれています。
-
リポジトリをクローンします。
git clone <repository-url>
-
依存関係をインストールします。
npm install
-
.env.local.tmpを.env.localに名前を変更し、環境変数を入力します。 -
ローカルで MongoDB のデータベースを作成するか、MongoDB Atlas などのクラウドデータベースサービスを使用します。
chatbottoという名前のデータベースとweightsという名前のコレクションを作成します。qaという名前のコレクションを作成します。settingsという名前のコレクションを作成します (空でも構いません)。- [オプション]
sample_dataの json ファイルを使用して、サンプルデータでデータベースを作成します。
開発モードでアプリケーションを実行するには、次のコマンドを使用します。
npm run dev本番モードでアプリケーションをビルドして実行するには、次のコマンドを使用します。
npm run build
npm startこのプロジェクトには、Docker コンテナでアプリケーションを実行するための Dockerfile と docker-compose.yml ファイルが含まれています。Docker コンテナをビルドして実行するには、次のコマンドを使用します。
docker-compose build
docker-compose up- ユーザーとの対話のためのチャットインターフェース
- RakutenMA ライブラリを使用した形態素解析
- アプリケーションを管理するための管理ページ
- ユーザーの入力の各単語の重要性を決定するための重みデータ
- qa データはJaQuADデータセットに基づいています
- JaQuAD JSON データ処理は、JSON データセットファイルを取り込み、QA データベースコレクション用の QA データファイルに変換するものです。
- 画像とアイコンは ChatGPT DALL-E によって生成されます
- Nextjs
- Nodejs
- RakutenMA
- MongoDB
- MongoDB Atlas
- VS Code
- Docker
- Docker Compose
- Material UI
- React
- Github Copilot
- Github Copilot Chat
- Vercel
貢献は歓迎します。プルリクエストを送信するか、変更内容を議論するための問題を作成してください。
This project is a rule-based chatbot application built with Nextjs, and Nodejs. It uses the RakutenMA library for morphological analysis of Japanese language and provides a chat interface for user interaction. The application also includes an admin page for managing the application's Weights data that is used to determine the importance of each word in the user's input.
-
Clone the repository:
git clone <repository-url>
-
Install the dependencies:
npm install
-
Rename
.env.local.tmpto.env.localand fill in your environment variables. -
Create a database locally in MongoDB or use a cloud database service such as MongoDB Atlas.
- Create a database named
chatbottoand a collection namedweights. - Create a collection named
qa - Create a collection named
settings(can be empty) - [Optional] use the json files in
sample_datato populate the database with sample data.
- Create a database named
To run the application in development mode, use the following command:
npm run devTo build and run the application in production mode, use the following commands:
npm run build
npm startThis project includes a Dockerfile and a docker-compose.yml file for running the application in a Docker container. To build and run the Docker container, use the following commands:
docker-compose build
docker-compose up- Chat interface for user interaction
- Morphological analysis using the RakutenMA library
- Admin page for managing the application
- Weights data for determining the importance of each word in the user's input
- qa data is based on JaQuAD dataset
- JaQuAD json data process that takes json dataset files and converts it into qa data files ready for the qa database collection
- Images and icons are generated by ChatGPT DALL-E
- Nextjs
- Nodejs
- RakutenMA
- MongoDB
- MongoDB Atlas
- VS Code
- Docker
- Docker Compose
- Material UI
- React
- Github Copilot
- Github Copilot Chat
- Vercel
Contributions are welcome. Please submit a pull request or create an issue to discuss the changes you want to make.