{"id":13627821,"url":"https://github.com/Ciyou/chatbot-telegram","last_synced_at":"2025-04-17T00:32:36.309Z","repository":{"id":64491258,"uuid":"576003302","full_name":"Ciyou/chatbot-telegram","owner":"Ciyou","description":"Yet another telegram ChatGPT bot which allows you to setup and run your bot with one simple command.","archived":false,"fork":false,"pushed_at":"2023-03-05T19:22:45.000Z","size":73,"stargazers_count":44,"open_issues_count":1,"forks_count":18,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-01T22:41:25.751Z","etag":null,"topics":["chatgpt","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Ciyou.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,"publiccode":null,"codemeta":null}},"created_at":"2022-12-08T19:36:38.000Z","updated_at":"2024-07-13T23:43:50.000Z","dependencies_parsed_at":"2024-01-14T08:55:03.233Z","dependency_job_id":"1daeeb6d-2407-4948-9b26-ea3d999f6cf9","html_url":"https://github.com/Ciyou/chatbot-telegram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ciyou%2Fchatbot-telegram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ciyou%2Fchatbot-telegram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ciyou%2Fchatbot-telegram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ciyou%2Fchatbot-telegram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ciyou","download_url":"https://codeload.github.com/Ciyou/chatbot-telegram/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223735128,"owners_count":17194049,"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":["chatgpt","telegram-bot"],"created_at":"2024-08-01T22:00:38.881Z","updated_at":"2024-11-08T18:30:55.957Z","avatar_url":"https://github.com/Ciyou.png","language":"TypeScript","funding_links":[],"categories":["在任何地方使用 ChatGPT"],"sub_categories":["聊天機器人"],"readme":"\u003ch1 align=\"center\"\u003e🤖️ chatbot-telegram\u003c/h1\u003e\n\u003cp  align=\"center\"\u003e\n  \u003cimg alt=\"Version 1.0.0\" src=\"https://img.shields.io/badge/version-1.0.0-blue.svg?cacheSeconds=2592000\" /\u003e\n  \u003ca href=\"#\" target=\"_blank\"\u003e\n    \u003cimg alt=\"License: MIT\" src=\"https://img.shields.io/badge/License-MIT-green.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://twitter.com/ciyou_lee\" target=\"_blank\"\u003e\n    \u003cimg alt=\"Twitter: Ciyou\" src=\"https://img.shields.io/twitter/follow/ciyou_lee.svg?style=social\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e Yet another telegram ChatGPT bot which allows you to setup and run your bot with one simple command. PRs and suggestions are welcome. Leave a 🌟 if you find this project helpful.\n\n\u003e ⚠️ Warning: The underlying model is currently `gpt-3.5-turbo`, which is already fine-tuned for conversation **but costs money**. *A new OpenAI account comes with $18 free credit though, which is enough to run this bot for some time.*\n\n\u003e Support for using a reverse proxy to access the origin ChatGPT will be added soon.\n\n\u003cdiv  align=\"center\"\u003e\n\u003cvideo src=\"https://user-images.githubusercontent.com/13758730/206657062-eec01c2a-0ef8-4605-b0b9-19a48fff236e.mp4\"/\u003e\n\u003c/div\u003e\n\n\n## 🪄 Features\n- [x] Run your ChatGPT telegram bot with single command.\n- [x] Support group chat by metioning `@` bot while `bot privacy mode` turned off.\n- [x] Reload conversion with `/reload` command.\n- [ ] Support group chat with `/chat` command while `bot privacy mode` turned on.\n- [ ] Support multiple conversions, unique for each chatID.\n- [ ] Support login to OpenAI with password.\n\n## 💿 Installation\n1. Make sure you have installed `Deno` already. \n\n    If you don't, follow this official document to install. https://deno.land/manual@v1.28.3/getting_started/installation#download-and-install\n\n2. Simply `git clone` or download this repo, `cd` into the project folder. \n\n3. Cache dependencies and check integrity with `lock.json`, *you only need to do this once*.\n\n```\ndeno cache --lock=lock.json chatbot.ts\n```\n\n## 🔮 Usage\n1. Complete Telegram bot token and ChatGPT session token in `env.example`.\n```\nBOT_TOKEN=YOUR_BOT_TOKEN\nOPENAI_API_KEY=YOUR_OPENAI_API_KEY\n```\nTo get your session token, see [Get ChatGPT Session Token](#-get-chatgpt-session-token).\n\n2. Rename `env.example` to `.env`\n\n```\nmv env.example .env\n```\n\n3. `deno run` and enjoy!\n\n```\ndeno run chatbot.ts\n```\n\nDeno requires you to approve file system reading, enviroment variables access and network access manually.\nYou can also run with these parammeters to give permission by default.\n\n```\ndeno run --allow-read --allow-env --allow-net chatbot.ts\n```\n\n## 🔑 Get OpenAI API Key\n1. Sign up for an OpenAI account at https://beta.openai.com/signup\n\n2. Generate a new API key at https://platform.openai.com/account/api-keys. This is your API key, anyone can use it to access your account which may cause unexpected charges. Keep it secret!\n\n3. Paste it in your `.env` file.\n\n## 💌 Credits\n- [chatgpt-api](https://github.com/transitive-bullshit/chatgpt-api) Node.js client for the unofficial ChatGPT API. - [License](https://github.com/transitive-bullshit/chatgpt-api/blob/main/license)\n- [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api) Telegram Bot API for NodeJS. - [License](https://github.com/yagop/node-telegram-bot-api/blob/master/LICENSE.md)\n- [Lodash](https://github.com/lodash/lodash) - [License](https://github.com/lodash/lodash/blob/master/LICENSE)\n- One-third of final code \u0026 almost all the comments was written by [Github Copilot](https://github.com/features/copilot). How far are we from the day where AI build whole project itself with AI 👀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiyou%2Fchatbot-telegram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCiyou%2Fchatbot-telegram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCiyou%2Fchatbot-telegram/lists"}