This repo a Telegram AI Bot(with chatgpt,azure-openai, palm2 etc.). And it works great.
You can deploy your own bot
- List of allowed Telegram users
- use
chatgpt-3.5-turbo
default - reply with voice message (use azure text to speech)
- multi language voice message support (azure TTS)
- picture ocr and translate, summary, tell story joke etc.
- parse a url link(only summary the text for now)
- paLM2 support(use azure translate to en and ask palm2, palm2 translate is so weak)
- azure openai support
- Anthropic claude support
- user management
- set stream response by user(for low speed response)
/retry
– Regenerate last bot answer/new
– Start new dialog/mode
– Select chat mode/help
– Show help/model
- List all ai model (chatgpt, palm2, azure_openai etc. admin required)/stream
- enable stream response or disable
-
Get your OpenAI API , paLM2 key, , azure openai key or claude key.
-
Get your Telegram bot token from @BotFather
-
Get your azure free trial account and get your azure key(text,speech,computer vision)
-
Docker
for docker user:
docker run -d --name chatgpt -v /etc/gpt:/etc/gpt andy963/telegram_ai_bot:latest
TODO:
- support voice message. (use azure text to speech)
- reply with multiple language voice (contains En & Zh, need azure)
- picture ocr and translate, summary, tell story joke etc.
- prompt list
- get content from url and summary the content(weak)
- paLM2 support
- export history(only text for now).
- multi model support (support chatgpt, palm2, azure_openai etc.)
- azure openai support
- Anthropic claude support
- user management
- set stream response (claude only for now)
- user list page by page
- model select by user
- get the latest new and summarize and send to user on schedule (maybe with voice)
if you are using ubuntu 22.04, you need to install the latest libssl1.1 either as a binary package, or by compiling it from sources.
## References
1. [*Build ChatGPT from GPT-3*](https://learnprompting.org/docs/applied_prompting/build_chatgpt)
2. [install libssl1.1](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?pivots=programming-language-python&tabs=linux%2Cubuntu%2Cdotnet%2Cjre%2Cmaven%2Cnodejs%2Cmac%2Cpypi)