matrix-bot-openai-wrapper/README.md

26 lines
1.1 KiB
Markdown
Raw Permalink Normal View History

2024-08-25 01:58:37 +00:00
# matrix-bot-openai-wrapper
## What does this bot do?
This bot relays the prompt to the openai API and sends the answer back to the user who made the request. All this is done through the Matrix chat-client.
2024-09-10 09:36:53 +00:00
### Why?
This way Openai can do less user-tracking since different people prompt through the same API-key.
Also imo chat clients, such as Matrix, are more practical instead of using the official app.
2024-08-25 01:58:37 +00:00
## Requirements
* Local environment requires `nodejs`, `yarn` and `nvm`
* Access token for the Matrix account. The access token can be obtained by using this [script](https://git.pub.solar/realestninja/fetch-matrix-access-token).
2024-09-10 09:36:53 +00:00
* [Openai API-key](https://platform.openai.com/settings/profile?tab=api-keys)
2024-08-25 01:58:37 +00:00
## Installation, setup and running the bot
* `yarn install`
* `nvm use`
* `cp config.ts.example config.ts`
2024-09-10 14:12:38 +00:00
* Add matrix homeserver, bot-token and Openai API-key to the `config.ts`
2024-08-25 01:58:37 +00:00
* Run `yarn start` to start the bot
## Planned features
2024-09-10 14:12:38 +00:00
* Enable encryption
2024-08-25 01:59:49 +00:00
* Allow setting the model in the config-file
2024-08-25 01:58:37 +00:00
* Add logic for user management
2024-09-10 09:36:53 +00:00
* Add option to temporarily set/reset context