{"id":23976136,"url":"https://github.com/shinyypig/gpt3-bot","last_synced_at":"2026-02-23T17:40:24.932Z","repository":{"id":141811293,"uuid":"593267811","full_name":"shinyypig/gpt3-bot","owner":"shinyypig","description":"A telegram bot using gpt3 api.","archived":false,"fork":false,"pushed_at":"2023-01-25T17:22:43.000Z","size":806,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T14:58:24.317Z","etag":null,"topics":["chatbot","telegram-bot","telegram-bot-api"],"latest_commit_sha":null,"homepage":"","language":"Python","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/shinyypig.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,"zenodo":null}},"created_at":"2023-01-25T16:14:34.000Z","updated_at":"2024-02-06T13:52:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ce9d74f-dc64-44f9-ae7d-bb5aed4f8d29","html_url":"https://github.com/shinyypig/gpt3-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shinyypig/gpt3-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fgpt3-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fgpt3-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fgpt3-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fgpt3-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinyypig","download_url":"https://codeload.github.com/shinyypig/gpt3-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fgpt3-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29749237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"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":["chatbot","telegram-bot","telegram-bot-api"],"created_at":"2025-01-07T06:56:45.972Z","updated_at":"2026-02-23T17:40:24.926Z","avatar_url":"https://github.com/shinyypig.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GPT3 Telegram Bot\n\nOpenAI chatbot for Telegram using GPT-3. Generally, the bot will respond to any message you send to it and render the text in a nice format. You can also use the `/print` command to print the chat history, and the `/clear` command to clear the chat history.\n\nCommand reference:\n\n``` text\n/print - Print the talk sessions.\n/clear - Clear the talk sessions.\n/set - Set the prompt header.\n```\n\n## Docker Deployment\n\n``` yaml\nversion: \"3\"\nservices:\n  gpt3-bot:\n    image: shinyypig/gpt3-tgbot:latest\n    container_name: gpt3-bot\n    environment:\n        - OPENAI_KEY=Your OpenAI API Key\n        - OPENAI_MODEL=text-davinci-003 # The model to use.\n        - TELEGRAM_KEY=Your Telegram Bot Token\n        - TELEGRAM_USER_ID=[Your Telegram User ID].\n        - PROMPT_LIMIT=5 # The number of sessions to send to OpenAI.\n        - PYTHONUNBUFFERED=1 # See python print in docker logs.\n    restart: unless-stopped\n```\n\nNote that this bot only response to the user specified in `TELEGRAM_USER_ID`, and the `TELEGRAM_USER_ID` is a list so that multiple users can use this bot, e.g., `TELEGRAM_USER_ID=[213980, 214031]`.\n\n## Prompt Header\n\nThe prompt send to OpenAI has the following format:\n\n``` text\nI will reply your question in HTML format, using HTML syntax to annotate: link, underline, bold, italic, inline code, code block, use \"-\" for a list.\nYou: Who are you?\nAI: I am GPT3, a language model trained by OpenAI.\nYou: What is your name?\nAI: My name is GPT3.\nYou: What is your favorite color?\nAI:\n```\n\nwhere\n\n``` text\nI will reply your question in HTML format, using HTML syntax to annotate: link, underline, bold, italic, inline code, code block, use \"-\" for a list.\n```\n\nis the prompt header. You can change the prompt header by using the `/set` command.\n\nMeawhile, the left part is the talk sessions, this code only save the last `PROMPT_LIMIT` sessions. You can use the `/print` command to print the talk sessions, and the `/clear` command to clear the talk sessions.\n\nIf you are not familiar with English, you can use the `/set` command to change the prompt header to your native language.\nfor example, if you are Chinese, you can change the prompt header to Chinese:\n\n``` text\n我将以HTML格式回答您的问题，使用HTML语法进行标注：链接、下划线、粗体、斜体、内联代码、代码块，使用\"-\"创建列表。\n```\n\nThen, ask the bot a question in Chinese, and the bot will reply in Chinese. Note that since I speak Chinese, the Chinese prompt header is set as default.\n\n### Screenshots\n\n![EN](./imgs/en.png)\n\n![CN](./imgs/cn.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyypig%2Fgpt3-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinyypig%2Fgpt3-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyypig%2Fgpt3-bot/lists"}