text-gen-bot/README.md

34 lines
1.1 KiB
Markdown

# text-gen-bot
Matrix bot that generates messages based off of messages of other users using a neural network.
## Usage
First install the needed [libraries](#setup). Then copy `example.config.json` and rename it `config.json`. Replace the items in angled brackets with their respective values of the bot account (e.g. replace `<DOMAIN.TLD>` with the homeserver url like `https://matrix.org` or `https://arrayinamatrix.xyz`). You can follow the instructions [here](https://matrix.org/docs/guides/usage-of-matrix-bot-sdk#instantiation) to obtain the token of an account.
Once the config file has been populated with valid data, execute the `index.js` file (Warning: executing for the first time will be slow.).
```sh
$ node index.js
...
<some warnings show up, ignore them>
...
Client has started!
```
## Setup
The project is split into 2 parts `index.js` and `textgen.py`. The `index.js` file contains the code that interacts with the user on Matrix and grabs text generated by the `textgen.py` file.
Install JavaSript SDK:
```sh
> pnpm add matrix-bot-sdk
```
Install Python module:
```sh
> pip3 install aitextgen
```