openai-chatgpt-telegram-bot/documentation/en/docs/index.md

142 lines
5.7 KiB
Markdown
Raw Normal View History

2023-03-15 22:55:51 +03:00
---
title: Personal ChatGPT Telegram Bot
hide:
- navigation
2023-03-15 23:54:37 +03:00
description: The project uses your ChatGPT token to access the ChatGPT API and let you chat with ChatGPT directly in Telegram.
2023-03-15 22:55:51 +03:00
---
# Personal ChatGPT Telegram Bot
> Introducing the ultimate AI-powered chatbot for Telegram - the perfect companion for anyone looking for quick, accurate answers to their questions. Our bot uses state-of-the-art machine learning technology powered by the ChatGPT model, allowing it to understand natural language inputs and respond with human-like precision.
>
> With our bot, you can ask anything you want, from simple queries to complex questions. Whether you're looking for information on the latest news, need help with a math problem, or just want to chat with a virtual friend, our bot has you covered.
>
> What's more, our bot is designed to be easy to use and user-friendly. Simply type in your question or query, and the bot will do the rest, providing you with a quick and accurate response in seconds. No more scrolling through endless search results or struggling to find the information you need - our bot does all the hard work for you.
>
> So why wait? Try out our ChatGPT-powered Telegram bot today and experience the future of AI-powered chatbots for yourself!
>
> (с) Generated by ChatGPT
But seriously, the project uses your ChatGPT token to access the ChatGPT API and let you chat with ChatGPT directly in Telegram.
2023-03-15 23:54:37 +03:00
## Features
2023-03-15 22:55:51 +03:00
2023-03-15 23:54:37 +03:00
See for yourself how easy and convenient it is to use ChatGPT in Telegram. It is better to see once than to hear 100 times.
2023-03-15 22:55:51 +03:00
2023-03-15 23:54:37 +03:00
<video controls width="450">
<source id="mp4" src="demo.mp4" type="video/mp4">
</video>
### Commands
`/clear_context` - Clears the conversation context. In fact, it deletes the chat and creates a new one.
`/prompt your_question` - Allows you to ask a question outside the context of the main conversation.
2023-03-15 22:55:51 +03:00
## Privacy
See my last name in the domain? [I'm a developer](https://mark.struchkov.dev), [blogger](https://struchkov.dev/blog/ru/), and publicly active. I don't have the benefit of getting dirty under my own name. I assure you that your data is not transferred to third parties, even I do not know about your requests to ChatGPT. You can see for yourself by examining the code, it's opensource.
2023-03-15 23:54:37 +03:00
## Let's get started
Enough words, let's launch your personal ChatGPT Telegram bot. 🚀
### Preparing
2023-03-15 22:55:51 +03:00
* You must have [Docker installed](https://docs.docker.com/engine/install/). You can run the project both on the PC and on the server.
* You must [register a bot in Telegram](https://t.me/BotFather) and get an access token.
* You also need [ChatGPT access token](https://platform.openai.com/account/api-keys).
* You must know your telegramId. [You can find it out here.](https://t.me/myidbot).
2023-03-15 23:54:37 +03:00
### Docker Run
2023-03-15 22:55:51 +03:00
``` bash
2023-03-15 23:54:37 +03:00
docker run -it --name chatgpt-telegram-bot \
--env TELEGRAM_BOT_TOKEN= \
--env TELEGRAM_BOT_USERNAME= \
--env TELEGRAM_PERSON_ID= \
--env CHAT_GPT_TOKEN= \
upagge/chatgpt-telegram-bot:develop
2023-03-15 22:55:51 +03:00
```
2023-03-15 23:54:37 +03:00
!!! warning ""
2023-03-15 22:55:51 +03:00
2023-03-15 23:54:37 +03:00
`TELEGRAM_BOT_USERNAME` - Specify a name with the ending bot here, not a public name.
#### Telegram Proxy
2023-03-15 22:55:51 +03:00
If you have Telegram blocked, you can specify proxy settings to connect.
``` bash
2023-03-15 23:54:37 +03:00
docker run -it --name chatgpt-telegram-bot \
--env TELEGRAM_BOT_TOKEN= \
--env TELEGRAM_BOT_USERNAME= \
--env TELEGRAM_PERSON_ID= \
--env CHAT_GPT_TOKEN= \
--env TELEGRAM_PROXY_ENABLE=true \
--env TELEGRAM_PROXY_HOST= \
--env TELEGRAM_PROXY_PORT= \
--env TELEGRAM_PROXY_TYPE=SOCKS5 \
--env TELEGRAM_PROXY_USERNAME= \
--env TELEGRAM_PROXY_PASSWORD= \
upagge/chatgpt-telegram-bot:develop
2023-03-15 22:55:51 +03:00
```
2023-03-15 23:54:37 +03:00
!!! note ""
* Available options `SOCKS5`, `SOCKS4`, `HTTP`.
* Optional. If there is no authorization, you can leave it blank.
### DockerCompose
!!! warning ""
Don't forget to create a file with the variable `.env`.
=== ":simple-docker: docker-compose.yml"
``` yaml
version: '3.8'
services:
chat-gpt:
image: upagge/chatgpt-telegram-bot:develop
container_name: chatgpt-bot
restart: always
environment:
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
TELEGRAM_BOT_USERNAME: ${TELEGRAM_BOT_USERNAME}
TELEGRAM_PERSON_ID: ${TELEGRAM_PERSON_ID}
CHAT_GPT_TOKEN: ${CHAT_GPT_TOKEN}
```
=== ":material-variable: .env"
``` text
TELEGRAM_BOT_TOKEN=
TELEGRAM_BOT_USERNAME=
TELEGRAM_PERSON_ID=
CHAT_GPT_TOKEN=
```
2023-03-15 22:55:51 +03:00
## :heart:{ .heart } Support Develop
Sponsorship makes a project sustainable because it pays for the time of the maintainers of that project, a very scarce resource that is spent on developing new features, fixing bugs, improving stability, solving problems, and general support. The biggest bottleneck in Open Source is time.
- Bank card for residents of the Russian Federation: [https://www.tinkoff.ru/cf/4iU6NB3uzqx](https://www.tinkoff.ru/cf/4iU6NB3uzqx)
- Crypto:
* TON: `struchkov-mark.ton`
* BTC (Taproot): `bc1pt49vnp43c4mktk6309zlq3020dzd0p89gc8d90zzn4sgjvck56xs0t86vy`
* ETH: `0x7668C802Bd71Be965671D4Bbb1AD90C7f7f32921`
* USDT (ERC-20): `0x7668C802Bd71Be965671D4Bbb1AD90C7f7f32921`
* DAI (ERC-20): `0x7668C802Bd71Be965671D4Bbb1AD90C7f7f32921`
* BNB: `0xDa41aC95f606850f2E01ba775e521Cd385AA7D03`
* USD: `0xDa41aC95f606850f2E01ba775e521Cd385AA7D03`
* DAI: `0xDa41aC95f606850f2E01ba775e521Cd385AA7D03`
## FAQ
??? question "What model is used?"
2023-03-15 23:54:37 +03:00
For now the `gpt-3.5-turbo` model is used. In future versions you will be able to choose the model.
## Other Questions
If you don't understand something, you can ask a question here :point_down: or in a [discussion on GitHub.](https://github.com/uPagge/openai-chatgpt-telegram-bot/discussions)