-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Charlie Bacon
committed
Jun 12, 2024
1 parent
e8585e8
commit e8bfdfe
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# A fully functional AI Powered Telegram bot | ||
|
||
## Supported commands | ||
You can either: | ||
- `/ask` for a specified question. | ||
- `/mediate` to read the last N messages of a chat group and mitigate an argument. | ||
|
||
## Environment variables needed | ||
``` | ||
- TELOXIDE_TOKEN= "/* Your Telegram Bot API Key */" | ||
- OPENAI_API_KEY= "/* Your OpenAI API Key */" | ||
- OPENAI_ORG_ID= "/* Your OpenAI Organization ID */" | ||
``` | ||
|
||
## Basic usage | ||
|
||
You need to specify the personality of the bot as well as its criteria when mitigating an argument. | ||
A size for the context of the N last messages of the chat group is also needed. | ||
|
||
For a detailed example go to [TelitairoBot] | ||
|
||
### Example | ||
|
||
``` | ||
#[tokio::main] | ||
async fn main() { | ||
pretty_env_logger::init(); | ||
log::info!("Starting bot"); | ||
let telitairo_bot = TelitairoBot::new( | ||
String::from(/*Personality */), | ||
String::from(/* Mediation criteria */), | ||
/*size */, | ||
); | ||
telitairo_bot.dispatch().await; | ||
} | ||