{"id":20784597,"url":"https://github.com/xzeldon/fooocos-telegram-bot","last_synced_at":"2025-04-09T17:05:57.601Z","repository":{"id":209154534,"uuid":"723340813","full_name":"xzeldon/fooocos-telegram-bot","owner":"xzeldon","description":"Generate images with AI inside Telegram in inline mode","archived":false,"fork":false,"pushed_at":"2023-11-27T13:55:17.000Z","size":6752,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T17:05:50.524Z","etag":null,"topics":["ai","bot","fooocos","generative-art","image-generation","telegram"],"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/xzeldon.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":"2023-11-25T11:06:14.000Z","updated_at":"2024-06-13T19:33:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ba4dcea-2af8-4f6c-8f48-e9add240e1de","html_url":"https://github.com/xzeldon/fooocos-telegram-bot","commit_stats":null,"previous_names":["xzeldon/fooocos-telegram-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzeldon%2Ffooocos-telegram-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzeldon%2Ffooocos-telegram-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzeldon%2Ffooocos-telegram-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xzeldon%2Ffooocos-telegram-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xzeldon","download_url":"https://codeload.github.com/xzeldon/fooocos-telegram-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074976,"owners_count":21043490,"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":["ai","bot","fooocos","generative-art","image-generation","telegram"],"created_at":"2024-11-17T14:31:14.484Z","updated_at":"2025-04-09T17:05:57.580Z","avatar_url":"https://github.com/xzeldon.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fooocos-telegram-bot\n\n![bot](static/gorilla.gif)\n\n#### ⚠️ The project may contain some bugs and errors, provided as is\n\nDynamic inline bot leveraging the robust capabilities of Fooocos for image generation. This bot integrates seamlessly with Telegram, offering an intuitive and engaging user experience.\n\nCurrent [FooocosAPI](https://github.com/konieshadow/Fooocus-API/tree/bf2f2c745a159e13b8de93fd000470ed98c973c4) commit hash: `bf2f2c745a159e13b8de93fd000470ed98c973c4`\n\n\u003e Mirror on my [\u003cimg src=\"https://git.zeldon.ru/assets/img/logo.svg\" align=\"center\" width=\"20\" height=\"20\"/\u003e Git](https://git.zeldon.ru/zeldon/fooocos-telegram-bot.git)\n\n# Getting Started\n\n## System Requirements\nBefore diving in, ensure your system meets these prerequisites:\n\n- Git\n- Python \u003e= 3.10\n- NodeJS \u003e= 20\n- An Nvidia GPU with a minimum of 4GB VRAM (other GPUs may be supported; check the [official Fooocos repository](https://github.com/konieshadow/Fooocus-API) for details).\n\n## Installation Guide for Windows\n\n\u003e This guide for **Windows** only, but for Linux the logic is exactly the same, but the commands may be slightly different\n\n### Install the correct FooocosAPI version locally:\n\n1. Clone the FooocosAPI repository:\n\n```bash\ngit clone https://github.com/konieshadow/Fooocus-API/tree/bf2f2c745a159e13b8de93fd000470ed98c973c4\n```\n2. Navigate to the cloned directory:\n\n```bash\ncd Fooocus-API\n```\n3. Create and activate a Python virtual environment:\n\n```bash\npython -m venv venv\n.\\venv\\Scripts\\activate\n```\n\n4. Install requirements:\n\n```bash\npip install -r requirements.txt\n```\n5. Launch FooocosAPI:\n\n```bash\npython .\\main.py --host 0.0.0.0\n```\nIf successful, you should see output similar to this:\n\n![output](static/output.png)\n\nFor subsequent runs, simply activate the virtual environment and start the API:\n\n```bash\n.\\venv\\Scripts\\activate\npython .\\main.py --host 0.0.0.0\n```\n\n\u003e Tip: You can also try the [latest FooocosAPI version](https://github.com/konieshadow/Fooocus-API), but you might need to copy and replace openapi.json from `http://localhost:8888/openapi.json` (default) to `fooocos` directory, regenerate the client (`npm run fooocos:typegen`) and address any possible TypeScript compiler errors.\n\n### Setting Up the Bot:\n\n1. Clone this repository\n\n```bash\ngit clone https://github.com/xzeldon/fooocos-telegram-bot.git\n```\n\n2. Install dependencies:\n\n```bash\nnpm i\n```\n\n3. Prepare your configuration file:\n\n- Duplicate the `.env.sample` file and rename it to `.env`.\n- Edit the `.env` file with your specific details as per the table below:\n\n\u003ctable\u003e\n\u003cthead\u003e\n  \u003ctr\u003e\n    \u003cth\u003eVariable\u003c/th\u003e\n    \u003cth\u003eType\u003c/th\u003e\n    \u003cth\u003eDescription\u003c/th\u003e\n  \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eNODE_ENV\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eSpecifies the application environment. (\u003ccode\u003edevelopment\u003c/code\u003e or \u003ccode\u003eproduction\u003c/code\u003e)\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBOT_TOKEN\u003c/td\u003e\n    \u003ctd\u003e\n        String\n    \u003c/td\u003e\n    \u003ctd\u003e\n        Telegram Bot API token obtained from \u003ca href=\"https://t.me/BotFather\"\u003e@BotFather\u003c/a\u003e.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eFOOOCOS_API_URL\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eURL of the Fooocos-API endpoint.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDUMMY_CHAT_ID\u003c/td\u003e\n    \u003ctd\u003eString\u003c/td\u003e\n    \u003ctd\u003eID of a dummy chat for uploading images to retrieve their file_id for inline message editing.\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n4. Start the bot:\n\n    - For development with hot reload:\n        ```bash\n        npm run dev\n        ```\n\n    - For standard operation:\n        ```bash\n        npm run start\n        ```\n\n# License\nThis project is open-source, licensed under the MIT License. Feel free to use, modify, and distribute it as you see fit.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzeldon%2Ffooocos-telegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxzeldon%2Ffooocos-telegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxzeldon%2Ffooocos-telegram-bot/lists"}