{"id":23810384,"url":"https://github.com/vauth/somnium","last_synced_at":"2025-04-13T10:34:23.126Z","repository":{"id":236009919,"uuid":"791718386","full_name":"Vauth/somnium","owner":"Vauth","description":"Create beautiful artwork using the power of AI on cloudflare workers.","archived":false,"fork":false,"pushed_at":"2024-12-27T19:46:10.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-27T01:51:30.430Z","etag":null,"topics":["ai","cloudflare-workers","dream","serverless","somnium","stable-diffusion","telegram-bot-api"],"latest_commit_sha":null,"homepage":"https://support@execalchat.t.me","language":"JavaScript","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/Vauth.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":"2024-04-25T08:34:05.000Z","updated_at":"2025-01-15T13:29:50.000Z","dependencies_parsed_at":"2024-04-25T09:50:25.982Z","dependency_job_id":null,"html_url":"https://github.com/Vauth/somnium","commit_stats":null,"previous_names":["vauth/somnium"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vauth%2Fsomnium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vauth%2Fsomnium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vauth%2Fsomnium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vauth%2Fsomnium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vauth","download_url":"https://codeload.github.com/Vauth/somnium/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248698967,"owners_count":21147565,"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","cloudflare-workers","dream","serverless","somnium","stable-diffusion","telegram-bot-api"],"created_at":"2025-01-02T00:14:18.774Z","updated_at":"2025-04-13T10:34:23.035Z","avatar_url":"https://github.com/Vauth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n   Somnium\n  \u003ca href=\"#Gif\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/Tarikul-Islam-Anik/Animated-Fluent-Emojis/master/Emojis/Travel%20and%20places/Milky%20Way.png\" width=\"25px\"\u003e\u003c/a\u003e\n   Worker\n\u003c/h1\u003e\n\u003cp\u003eCreate your own Somnium AI Art Generator Bot using cloudflare workers.\u003c/p\u003e\n\n\u003cbr\u003e\n\n## 🗂 Variables\n```javascript\nconst BOT_TOKEN = \"BOT_TOKEN\"; // Insert your bot token.\nconst BOT_WEBHOOK = \"/endpoint\"; // Let it be as it is.\nconst BOT_SECRET = \"BOT_SECRET\"; // Insert a powerful secret text (only [A-Z, a-z, 0-9, _, -] are allowed).\nconst BOT_OWNER = 123456789; // Insert your telegram account id.\nconst PUBLIC_BOT = false; // Make your bot public (only [true, false] are allowed).\n```\n\n### Setup:\n- Get `BOT_TOKEN` from [@botfather](https://t.me/botfather).\n- Change `BOT_WEBHOOK` with your preferred webhook.\n- Change `BOT_SECRET` with a powerful secret text (only `[A-Z, a-z, 0-9, _, -]` are allowed).\n- Get `BOT_OWNER` from [@idbot](https://t.me/username_to_id_bot).\n- Change `PUBLIC_BOT` to make your bot public (only `[true, false]` are allowed).\n\n\u003cbr\u003e\n\n## ⚙️Deploy\n- Create a [Cloudflare](https://www.cloudflare.com/) **account**.\n- Navigate to `Workers \u0026 Pages \u003e Create \u003e Create Worker`.\n- Deploy the worker by clicking **Deploy**.\n- Edit the code by clicking **Edit Code**.\n- Upload `worker.js` into **Cloudflare**.\n- Modify the [variables](#-variables).\n- Finally, **Deploy**.\n\n[![Deploy to Cloudflare Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/vauth/somnium)\n### Setup:\n- Once you deployed the bot on Cloudflare.\n- Check `XXX.XXXX.workers.dev/getMe` to verify your bot authorization.\n- Open `XXX.XXXX.workers.dev/registerWebhook` to register your bot webhook.\n- Now you can start using your bot by sending `prompt` or `/generate prompt`.\n\n\u003cbr\u003e\n\n## 📡 Live Demo\nCheck out the live demo [here](https://t.me/InsomniumBot).\n\n\u003cbr\u003e\n\n## 📦 Python Package ([pypi.org](https://pypi.org/project/somnium/))\n### Installation:\n```bash\npython3 -m pip install somnium\n```\n### Usage:\n```python\nif __name__ == \"__main__\":\n   from somnium import Somnium\n\n    # Get Styles (url)\n    print(Somnium.StylesGraph())\n\n    # Get Styles (list)\n    print(Somnium.Styles())\n\n    # Generate Artwork\n    print(Somnium.Generate('Hunter Schafer', 2009))\n```\n\n\u003cbr\u003e\n\n## 🛠 Credits\nSpecial thanks to [Zarox](https://github.com/Zar0x) for integrating somnium to cloudflare.\n\n\u003cbr\u003e\n\n## 🔗 Contributing\nContributions are welcome! Feel free to submit a pull request or report an issue.\n\n\u003cbr\u003e\n\n## 🔎 License\n```\nMIT License\n\nCopyright (c) 2024 Vauth\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvauth%2Fsomnium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvauth%2Fsomnium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvauth%2Fsomnium/lists"}