Compare commits

...

4 commits

Author SHA1 Message Date
array-in-a-matrix d6c3b25cc4 added dependencies 2022-08-15 17:46:01 -04:00
array-in-a-matrix a7a32a23c5 added bolier plate code 2022-08-15 17:28:08 -04:00
array-in-a-matrix 13cb7a463e dependencies 2022-08-15 17:17:45 -04:00
array-in-a-matrix 88033b3474 add seperation between defaults and added lines 2022-08-15 17:16:54 -04:00
5 changed files with 1160 additions and 1 deletions

2
.gitignore vendored
View file

@ -152,6 +152,8 @@ cython_debug/
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
#############################################################################################
# ignore folders
node_modules

View file

@ -1,3 +1,17 @@
# text-gen-bot
Matrix bot that generates messages based off of messages of other users using a neural network.
Matrix bot that generates messages based off of messages of other users using a neural network.
## Development setup
Install JavaSript SDK:
```sh
pnpm add matrix-bot-sdk
```
Install Python module:
```sh
pip3 install textgenrnn
```

View file

@ -0,0 +1,13 @@
import config from './config.json' assert {type: "json"};
import { MatrixClient, SimpleFsStorageProvider, AutojoinRoomsMixin } from "matrix-bot-sdk";
const storage = new SimpleFsStorageProvider("storage.json");
const client = new MatrixClient(config.baseUrl, config.token, storage);
AutojoinRoomsMixin.setupOnClient(client)
client.start().then(() => console.log(`Client has started!`));
client.on("room.message", (roomId, event) => {
if (! event["content"] || event["sender"] === config.userId) return;
// code here
})

6
package.json Normal file
View file

@ -0,0 +1,6 @@
{
"dependencies": {
"matrix-bot-sdk": "^0.6.1"
},
"type": "module"
}

1124
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff