{"id":16560653,"url":"https://github.com/mathieu2301/telegramgpt","last_synced_at":"2025-07-20T14:04:08.825Z","repository":{"id":237410779,"uuid":"637561208","full_name":"Mathieu2301/TelegramGPT","owner":"Mathieu2301","description":"A Telegram bot that uses OpenAI's GPT-3 to generate messages based on the context of the conversation.","archived":false,"fork":false,"pushed_at":"2023-05-08T21:25:25.000Z","size":38,"stargazers_count":4,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-08T23:37:31.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mathieu2301.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2023-05-07T23:20:44.000Z","updated_at":"2024-08-29T09:07:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"665f7028-d86c-4c92-b986-dfbb1684aae4","html_url":"https://github.com/Mathieu2301/TelegramGPT","commit_stats":null,"previous_names":["mathieu2301/telegramgpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mathieu2301/TelegramGPT","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FTelegramGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FTelegramGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FTelegramGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FTelegramGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mathieu2301","download_url":"https://codeload.github.com/Mathieu2301/TelegramGPT/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mathieu2301%2FTelegramGPT/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266135683,"owners_count":23881802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-11T20:29:42.048Z","updated_at":"2025-07-20T14:04:08.817Z","avatar_url":"https://github.com/Mathieu2301.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Telegram GPT\n\nA Telegram bot that uses OpenAI's GPT-3 to generate messages based on the context of the conversation.\n\n## Usage\n\n1. Create a Telegram bot with [BotFather](https://t.me/botfather)\n2. Create an OpenAI account and get an API key\n3. Set your keys in the `.env` file or as environment variables\n4. Start the bot\n5. Send a message to the bot or add it to a group chat\n6. type `/` to see the list of commands\n\n## Development\n\n1. Install dependencies\n\n    ```sh\n    yarn\n    ```\n\n2. Configuration\n\n    Create a `.env` file or set env variables:\n\n    ```properties\n    TELEGRAM_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n    OPENAI_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n    # Optional:\n    MONGO_URI=mongodb://localhost:27017\n    MONGO_DB=telegram-gpt\n    CONTEXT_HISTORY_MAX_LENGTH=10\n    ```\n\n3. Start the bot\n\n    ```sh\n    yarn start\n    ```\n\n## Deployment with Docker Compose\n\n```yml\nversion: '3'\n\nservices:\n  telegram-gpt:\n    image: ghcr.io/mathieu2301/telegram-gpt:latest\n    restart: always\n    environment:\n      TELEGRAM_KEY: ${TELEGRAM_KEY}\n      OPENAI_KEY: ${OPENAI_KEY}\n      # Optional:\n      CONTEXT_HISTORY_MAX_LENGTH: 10\n      # You can use MongoDB as a database, otherwise\n      # the contexts will be stored in a folder.\n      # Remove this if you don't want to use MongoDB.\n      MONGO_URI: ${MONGO_URI}\n      MONGO_DB: telegram-gpt\n\n    # Remove this if you use MongoDB\n    volumes:\n      - contexts:/app/contexts\n\n# Remove this if you use MongoDB\nvolumes:\n  contexts:\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu2301%2Ftelegramgpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathieu2301%2Ftelegramgpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathieu2301%2Ftelegramgpt/lists"}