Welcome to the comprehensive setup guide for the ChatGPT Text Generation Service, a powerful tool that utilizes the state-of-the-art GPT-3.5 Turbo model to generate natural language text. Follow this step-by-step guide to set up the Text Generation Service and unlock the capabilities of ChatGPT.
- Overview
- Features
- Installation
- Usage
- Configuration
- Text Generation
- Contributing
- License
- Contact
- Acknowledgment
TelegramGPT is a Telegram chatbot powered by OpenAI's GPT-3.5 Turbo model created using Python. It reads messages from a specified chat file and responds to user messages in Telegram using the GPT-3.5 Turbo model.
- Seamless integration with Telegram
- Configurable chat file selection
- Utilizes OpenAI GPT-3.5 Turbo for natural language understanding
- Easy-to-use and extendable
git clone https://github.com/YourUsername/ChatGPT-Text-Generation
pip install -r requirements.txt
-
Create a Telegram bot on the Telegram BotFather.
-
Copy the bot token.
-
Replace
Your Telegram Bot Token Goes here
in the.env
file with the actual bot token.
-
Visit the OpenAI website: https://beta.openai.com/
-
Sign up for an account if you don't have one. Follow the registration process.
-
Once you're logged in, navigate to the OpenAI API section.
- On the OpenAI dashboard, click on your account name in the top right corner.
- Select "API" from the dropdown menu.
-
In the API section, you'll find the option to create a new API key.
-
Click on the "Create API Key" button.
-
Give your API key a meaningful name related to your project (e.g., "TelegramGPT").
-
Copy the generated API key. It will look something like this:
sk-xxxxxx-xxxxxxxxxxxxxx
. -
Open the
.env
file in your TelegramGPT project directory. -
Replace the placeholder
Your openAI API key goes here
with the actual API key you obtained from OpenAI:TELEGRAM_TOKEN=your_telegram_bot_token OPENAI_API_KEY=sk-xxxxxx-xxxxxxxxxxxxxx
-
Save the changes to the
.env
file. -
Now, when you run your TelegramGPT bot, it will use the OpenAI GPT-3.5 Turbo model with the specified API key.
-
Start a chat with your Telegram bot.
-
Use the
/setfile
command to set the chat file (e.g.,/setfile 1
). -
Send messages to the bot and confirm that it generates responses using the GPT-3.5 Turbo model.
By following these steps, you've successfully created an OpenAI GPT-3.5 Turbo API key and integrated it into your TelegramGPT project. This key allows your bot to communicate with the OpenAI API and generate natural language responses.
You can configure the bot by modifying the following variables in main.py
:
fileNumber
: Change the chat file by setting this variable to 1, 2, or 3 before/setfile
flag and send it to bot.model
: Specify the GPT model to be used (default is "gpt-3.5-turbo").- Adjust other parameters like
temperature
,max_tokens
,top_p
,frequency_penalty
, andpresence_penalty
as needed.
chats/chat1.txt
: Sample chat file 1 — my resumechats/chat2.txt
: Sample chat file 2 — whatsapp chat bwtween me and my friendchats/chat3.txt
: Sample chat file 3 — a simple AI generated friends chat
Experiment with the service by sending text prompts and receiving generated responses. Adjust configuration parameters for different text generation styles.
-
Clone the repository:
git clone https://github.com/RanitManik/TelegamGPT.git
-
Add This repo as Remote:
git remote add origin https://github.com/RanitManik/TelegamGPT.git
-
Create a New Branch for your feature or bugfix:
git checkout -b feature/{your_feature} or bugfix/{issue_number}
-
Commit your changes:
git commit -m "Your meaningful commit message here"
-
Push your changes to the repository:
git push origin feature/{your_feature} or bugfix/{issue_number}
Feel free to contribute to the project by opening issues or pull requests. Any feedback or improvements are appreciated.
This project is licensed under the MIT License - see the LICENSE file for details.
Social Media | Username | Link | |
---|---|---|---|
[email protected] |
|||
Ranit Manik |
|||
ranit_manik_ |
|||
RanitKumarManik |
|||
RANIT_MANIK |
I want to express my gratitude to CodeWithHarry for his insightful tutorial on creating the myGPT Discord Chatbot using OpenAI's GPT-3.5 Turbo model, which served as a crucial guide. Special thanks to contributors and the open-source community for enhancing the project. The inspiration behind TelegramGPT arose from the need for an advanced Telegram chatbot leveraging OpenAI's GPT-3.5 Turbo.
Best regards, Ranit Manik