{"id":22015148,"url":"https://github.com/ranitmanik/telegamgpt","last_synced_at":"2026-04-28T20:40:19.813Z","repository":{"id":213879658,"uuid":"735157429","full_name":"RanitManik/TelegamGPT","owner":"RanitManik","description":"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.","archived":false,"fork":false,"pushed_at":"2024-02-20T16:03:45.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-19T22:33:00.722Z","etag":null,"topics":["bot","botfather","chat-application","chatbot","chatgpt","chatgpt-api","openai","openai-api","telegram","telegram-api","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://t.me/RanitGPTBot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RanitManik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-12-23T21:44:22.000Z","updated_at":"2024-12-09T00:02:16.000Z","dependencies_parsed_at":"2024-01-13T16:02:37.520Z","dependency_job_id":"4f7a530f-e934-4e1d-bfe5-7a51f21611a3","html_url":"https://github.com/RanitManik/TelegamGPT","commit_stats":null,"previous_names":["ranitmanik/telegamgpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RanitManik/TelegamGPT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RanitManik%2FTelegamGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RanitManik%2FTelegamGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RanitManik%2FTelegamGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RanitManik%2FTelegamGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RanitManik","download_url":"https://codeload.github.com/RanitManik/TelegamGPT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RanitManik%2FTelegamGPT/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32399002,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","botfather","chat-application","chatbot","chatgpt","chatgpt-api","openai","openai-api","telegram","telegram-api","telegram-bot","telegram-bot-api"],"created_at":"2024-11-30T04:19:43.016Z","updated_at":"2026-04-28T20:40:19.781Z","avatar_url":"https://github.com/RanitManik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv  align = \"center\"\u003e\n  \u003cimg src=\"https://github.com/RanitManik/TelegamGPT/assets/138437760/bc591d8b-b7f2-43b4-829a-5f2838d941bd\" height=\"100\"\u003e\n  \u003ch1\u003eTelegramGPT Chatbot\u003c/h1\u003e\n\u003c/div\u003e\n\nWelcome 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.\n\n\n## Table of Contents\n\n- [Overview](#overview)\n- [Features](#features)\n- [Installation](#installation)\n  - [Clone the Repository](#1-clone-the-repository)\n  - [Install Required Packages](#2-install-required-packages)\n- [Usage](#usage)\n  - [Set up Telegram Bot](#1-set-up-telegram-bot)\n  - [Create an OpenAI Account](#2-create-an-openai-account)\n  - [Access the OpenAI API Section](#3-access-the-openai-api-section)\n  - [Create a New API Key](#4-create-a-new-api-key)\n  - [Save and Run](#5-save-and-run)\n  - [Verify Functionality](#6-verify-functionality)\n- [Configuration](#configuration)\n- [Text Generation](#text-generation)\n- [Contributing](#contributing)\n- [License](#license)\n- [Contact](#contact)\n- [Acknowledgment](#acknowledgment)\n\n## Overview\n\nTelegramGPT 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.\n\n## Features\n\n- Seamless integration with Telegram\n- Configurable chat file selection\n- Utilizes OpenAI GPT-3.5 Turbo for natural language understanding\n- Easy-to-use and extendable\n\n## Installation\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/YourUsername/ChatGPT-Text-Generation\n```\n\n### 2. Install Required Packages\n\n```bash\npip install -r requirements.txt\n```\n   \n## Usage\n\n### 1. Set up Telegram Bot\n  \n  1. Create a Telegram bot on the [Telegram BotFather](https://core.telegram.org/bots#botfather).\n  \n  2. Copy the bot token.\n  \n  3. Replace `Your Telegram Bot Token Goes here` in the `.env` file with the actual bot token.\n\n### 2. Create an OpenAI Account\n    \n  1. Visit the OpenAI website: [https://beta.openai.com/](https://beta.openai.com/)\n  \n  2. Sign up for an account if you don't have one. Follow the registration process.\n\n### 3. Access the OpenAI API Section\n\n  1. Once you're logged in, navigate to the OpenAI API section.\n    \n     - On the OpenAI dashboard, click on your account name in the top right corner.\n     - Select \"API\" from the dropdown menu.\n\n### 4. Create a New API Key\n\n  1. In the API section, you'll find the option to create a new API key.\n    \n  2. Click on the \"Create API Key\" button.\n    \n  3. Give your API key a meaningful name related to your project (e.g., \"TelegramGPT\").\n    \n  4. Copy the generated API key. It will look something like this: `sk-xxxxxx-xxxxxxxxxxxxxx`.\n    \n  5. Open the `.env` file in your TelegramGPT project directory.\n    \n  6. Replace the placeholder `Your openAI API key goes here` with the actual API key you obtained from OpenAI:\n  \n     ```plaintext\n     TELEGRAM_TOKEN=your_telegram_bot_token\n     OPENAI_API_KEY=sk-xxxxxx-xxxxxxxxxxxxxx\n     ```\n\n### 5. Save and Run\n\n  1. Save the changes to the `.env` file.\n  \n  2. Now, when you run your TelegramGPT bot, it will use the OpenAI GPT-3.5 Turbo model with the specified API key.\n\n### 6. Verify Functionality\n  \n  1. Start a chat with your Telegram bot.\n  \n  2. Use the `/setfile` command to set the chat file (e.g., `/setfile 1`).\n  \n  3. Send messages to the bot and confirm that it generates responses using the GPT-3.5 Turbo model.\n  \n  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.\n\n## Configuration\n\nYou can configure the bot by modifying the following variables in `main.py`:\n\n- `fileNumber`: Change the chat file by setting this variable to 1, 2, or 3 before `/setfile` flag and send it to bot.\n- `model`: Specify the GPT model to be used (default is \"gpt-3.5-turbo\").\n- Adjust other parameters like `temperature`, `max_tokens`, `top_p`, `frequency_penalty`, and `presence_penalty` as needed.\n\n### Chat Files\n\n- `chats/chat1.txt`: [Sample chat file 1](chats/chat1.txt) — my resume\n- `chats/chat2.txt`: [Sample chat file 2](chats/chat2.txt) — whatsapp chat bwtween me and my friend\n- `chats/chat3.txt`: [Sample chat file 3](chats/chat3.txt) — a simple AI generated friends chat\n\n## Text Generation\n\nExperiment with the service by sending text prompts and receiving generated responses. Adjust configuration parameters for different text generation styles.\n\n## Contributing\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/RanitManik/TelegamGPT.git\n   ```\n\n2. **Add This repo as Remote**:\n\n   ```bash\n   git remote add origin https://github.com/RanitManik/TelegamGPT.git\n   ```\n\n3. **Create a New Branch** for your feature or bugfix:\n\n   ```bash\n   git checkout -b feature/{your_feature} or bugfix/{issue_number}\n   ```\n\n4. **Commit** your changes:\n\n   ```bash\n   git commit -m \"Your meaningful commit message here\"\n   ```\n\n5. **Push** your changes to the repository:\n\n   ```bash\n   git push origin feature/{your_feature} or bugfix/{issue_number}\n   ```\n\nFeel free to contribute to the project by opening issues or pull requests. Any feedback or improvements are appreciated.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Contact\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth\u003e\u003c/th\u003e\n    \u003cth\u003eSocial Media\u003c/th\u003e\n    \u003cth\u003eUsername\u003c/th\u003e\n    \u003cth\u003eLink\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://cdn4.iconfinder.com/data/icons/social-media-logos-6/512/112-gmail_email_mail-512.png\" width=\"20\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eEmail\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eranitmanik.dev@gmail.com\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"mailto:ranitmanik.dev@gmail.com\" target=\"_blank\"\u003eEmail\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/c/ca/LinkedIn_logo_initials.png/480px-LinkedIn_logo_initials.png\" width=\"20\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eLinkedIn\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eRanit Manik\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://www.linkedin.com/in/ranit-manik/\" target=\"_blank\"\u003eLinkedIn\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Instagram_icon.png/600px-Instagram_icon.png\" width=\"20\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eInstagram\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eranit_manik_\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://www.instagram.com/ranit_manik_/\" target=\"_blank\"\u003eInstagram\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/6/6c/Facebook_Logo_2023.png\" width=\"20\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eFacebook\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eRanitKumarManik\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://www.facebook.com/RanitKumarManik/\" target=\"_blank\"\u003eFacebook\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Logo_of_Twitter.svg/512px-Logo_of_Twitter.svg.png\" width=\"20\" /\u003e\u003c/td\u003e\n    \u003ctd\u003eTwitter\u003c/td\u003e\n    \u003ctd\u003e\u003ccode\u003eRANIT_MANIK\u003c/code\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"https://twitter.com/RANIT_MANIK\" target=\"_blank\"\u003eTwitter\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Acknowledgment\n\nI want to express my gratitude to [CodeWithHarry](https://www.youtube.com/c/CodeWithHarry) for his insightful tutorial on creating the [myGPT Discord Chatbot using OpenAI's GPT-3.5 Turbo model](https://youtu.be/BP-w99ZINTc?si=tcUeGGh3MKCYODuk), 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.\n\nBest regards, Ranit Manik\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franitmanik%2Ftelegamgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franitmanik%2Ftelegamgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franitmanik%2Ftelegamgpt/lists"}