A "Ho̍k tsè bûn" / "copypasta" / "複製文" bot for telegram
👉Start using the bot👈
- Post related copypasta for you whenever the bot detects matching keyword
- Generate summarization (or caption, for media) automaticly by utlizing top-of-the-line DL models
- Model used for text summarization: csebuetnlp/mT5_multilingual_XLSum
- Model used for image captioning: OFA-Sys/OFA-base
#ImageCaptioning
#TextGeneration
#TextSummarization
and more......
Supported commands atm:
- new/add: insert new Ho̍k tsè bûn into the database
- random: select a Ho̍k tsè bûn randomly and post it
- search: fuzzy search every file in database
- Automatically insert new media into the database whenever an media with caption is sent
- delete: delete copypasta
- example: show tutorial
Deploy on Replit.com
- Import the repo into replit
- Setup your config file following section "Config Setup" and move it to
/HokSeBunBot
- Run
go mod init HokSeBunBot
go mod tidy
bash run.sh
- (Optional) In order to make the bot work in group chat, turn off privacy mode for you bot (by using BotFother).
- Profit!
Environment Variable: API.TG.TOKEN
Description: API token for your telegram bot
Default value: "YOUR_TELEGRAM_API_TOKEN"
(no this does not work)
Environment Variable: API.HT.TOKENs
Description: A list of huggingface tokens, bot switchs token whenever it fails (ex: quota exceeded)
Default value= ["YOUR_HUGGINGFACETOKEN1", "YOUR_HUGGINGFACETOKEN2",]
Setting: LOG_FILE
Description: Name of your log file
Default value: "../log.log"
Setting: SUM_MODEL
Description: The desired model to use for summarization, any model which supports summarization in your language should work
Default value = "csebuetnlp/mT5_multilingual_XLSum"
Note: The model should support inference api to work.
Setting: MT_MODEL
Description: The desired model to use for translation, any model which supports translation in your language should work
Default value = "Helsinki-NLP/opus-mt-en-zh"
Note: This setting isn't working since the bot uses google translate
Setting: DIR
Description: The location to store your clover database
Default Value: "../HokSeBun_db"
Setting: COLLECTION
Description: The collection name in your clover database
Default Value: "Copypasta"