{"id":19438914,"url":"https://github.com/abhiprojectz/singulargpt","last_synced_at":"2025-05-07T20:30:40.606Z","repository":{"id":204101538,"uuid":"624725518","full_name":"abhiprojectz/SingularGPT","owner":"abhiprojectz","description":"SingularGPT - Automate device by ChatGPT , Make your device more like a human. For sponsoring visit the link. ($15 - One time)","archived":false,"fork":false,"pushed_at":"2024-02-26T15:48:05.000Z","size":737,"stargazers_count":182,"open_issues_count":4,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-02-26T16:48:24.269Z","etag":null,"topics":["ai-visionary","automation","chatgpt","gpt4","opencv"],"latest_commit_sha":null,"homepage":"https://itsanicode.lemonsqueezy.com/checkout/buy/c1a279a2-097c-449f-b6fc-e086a0b29c48","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhiprojectz.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":"2023-04-07T05:39:32.000Z","updated_at":"2024-02-26T15:49:05.000Z","dependencies_parsed_at":"2024-02-22T11:15:19.008Z","dependency_job_id":null,"html_url":"https://github.com/abhiprojectz/SingularGPT","commit_stats":null,"previous_names":["abhiprojectz/singulargpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiprojectz%2FSingularGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiprojectz%2FSingularGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiprojectz%2FSingularGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhiprojectz%2FSingularGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhiprojectz","download_url":"https://codeload.github.com/abhiprojectz/SingularGPT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223969232,"owners_count":17233615,"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-visionary","automation","chatgpt","gpt4","opencv"],"created_at":"2024-11-10T15:20:11.522Z","updated_at":"2024-11-10T15:20:11.996Z","avatar_url":"https://github.com/abhiprojectz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n**SingularGPT** is a open source project that automates your device using ChatGPT \u0026 GPT-4.\n\nWith 🚀 **SingularGPT** you can easily instruct your device with simple text based queries.\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/abhiprojectz/SingularGPT/blob/master/SGPT_Quickstart.ipynb)\n\n\u003e For example: \n\nLet's say you need to click on button that have a text as 'File' just say it: \n\n**Query:** Hey, please click on the item with text File.\n\nIt will perform the action by processing your query, turning them to its undernstandable instructions and execute them.\n\n---\n\n\n\n# :star2: Demo \n\nhttps://user-images.githubusercontent.com/64596494/230719544-a9bee6f2-4158-4784-b0ed-260bea7be067.mp4\n\n\n\n---\n\n\n# :star2: How to Use ?\n\nYou may just run it in google colab with a GPU.\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/abhiprojectz/SingularGPT/blob/master/SGPT_Quickstart.ipynb)\n\n**Follow these steps carefully**\n\n- 1. Install all the requirements\n\n```\npip install -r requirements.txt\n```\n\nMake sure that you run this command in the same directory where the `requirements.txt` file is located.\n\n- 2. If you are in linux then install below libs\n\n```sh \n\n!sudo apt-get install xvfb xorg xserver-xorg scrot imagemagick x11-utils xdotool\n\n```\n\n- 3. Create a .env file and place your OPENAI_API and change your platform name in `config/CONFIG.py`\n\nif you are on linux set as: `_PLATFORM` as linux [By default is `windows`]\n\n- 4. Run this file `main.py` by passing your query.\n\n```py\n\npython main.py\n\n```\n\n- 5. Use `SingularGPT` bot if you are stuck or raise a issue\n\n- 6. Make sure your instructions are in `script.py` file.\n\n\n## :star2: Quickstart\n\nCreate a `.env` file with `OPENAI_API` and place your openai_api api there or pass as environment variable.\n\nPut automation scripts in `script.py` and run it.\n\nWrite your prompt query in `Prompts/prompts.txt` file or,\npass as a string in the `main.py` file.\n\n```py\n# Run the main script.\npython main.py\n```\n\n---\n\n\n**To visualize this see this bot on Poe**\n\n![](https://user-images.githubusercontent.com/64596494/230727123-b01d6607-9f08-4abe-ae00-bda1eacbc5bf.PNG)\n\n\n![djlkdj](https://user-images.githubusercontent.com/64596494/230751800-1100bfa5-f9a7-4971-9224-6f0c442b5df1.PNG)\n\n\n\n---\n\n\n# :star2: How it locates element ?\n\nThe old way using X_PATH or CSS/JS Selectors or by just co-ordinates.\n\n```py\n\nelement_xpath = driver.find_element(By.XPATH, \"//a[@href='/login']\")\nelement_xpath.click()\n\n# or \n\nelement_css = driver.find_element(By.CSS_SELECTOR, \"button.btn-primary\")\nelement_css.click()\n\n```\n\n\u003e No, it uses the new GUI element detection techniques.\n\n\nNopes ! \n\n```py\n\nzex.text('Menu').click()\nzex.text('Edit').FindLeftOf().click() # Used to locate the element that is just left side of the target element.\n\n```\n\n---\n\n**Locate and perform actions to the element that is left or right or even the most nearest element to it.**\n\nZexUI is a standalone library that uses image processing techniques for GUI automation.\n\n---\n\n\n#  :star2: Automations lib apis\n\nHere are some methods and thier usage.\n\nSure! Here are the descriptions for each method:\n\n- `text()`: This method is used to locate a text element on the webpage based on the text content provided in the query.\n\n- `textRegex()`: This method is used to locate a text element on the webpage based on a regular expression provided in the query.\n\n- `textContains()`: This method is used to locate a text element on the webpage that contains a specific word provided in the query.\n\n- `image()`: This method is used to locate an image element on the webpage based on the image path provided in the query.\n\n- `findLeftOf()`: This method is used to locate an element that is to the left of the text/image provided in the query.\n\n- `findRightOf()`: This method is used to locate an element that is to the right of the text/image provided in the query.\n\n- `findTopOf()`: This method is used to locate an element that is above the text/image provided in the query.\n\n- `findBottomOf()`: This method is used to locate an element that is below the text/image provided in the query.\n\n- `findNearestTo()`: This method is used to locate the element that is nearest to the text/image provided in the query.\n\n- `click()`: This method is used to click on the element that is located using the text/image or any other method.\n\n- `mouseMove()`: This method is used to move the mouse to the element that is located using the text/image or any other method.\n\n- `scroll_up()`: This method is used to scroll up the webpage.\n\n- `scroll_down()`: This method is used to scroll down the webpage.\n\n- `scroll_left()`: This method is used to scroll left on the webpage.\n\n- `scroll_right()`: This method is used to scroll right on the webpage.\n\n... More are on the docs. \n\n\n**This is what this project aims and tries to achieve the same.**\n\n :star2: So, here's how the things works under the hood:\n\n+ Converts Natural language query to automation scripts that further can be used to achieve the task \n\n+ SingularGPT Process your screen, gets the required data what's being asked.\n\n+ Generates commands to achieve the task.\n\n---\n\n# :star2: What SingularGPT can do ?\n\n+ Recognize what's on your screen \n\n+ Even what's on your headless server using x11\n\n+ Can internally process them.\n\n+ Build automations scripts by its own\n\n+ Automates your device\n\n\n---\n\n# :star2: Breakdown of the project\n\nThis projects is made possible with the help of various fields in computer science such as AI based vision, Custom libs, device automation and internal logic processing using the latest ChatGPT \u0026 GPT-4.\n\nIn short:\n\nAI computer vision + Automation (ZexUI) + GPT\n\n\n---\n\n# :star2: Features \n\n+ No crawling mechanism\n+ Elements detection\n+ Text detection\n+ Components detection based on estimates\n+ Automate your device using NLP instructions\n+ Adds-on in a very lightweight presets\n+ Works even headless on a x11 server\n\n\n# :star2: Help \n\nConsidering leaving a star.\n\n\n# :star2: Docs\n\nHelp in writing the docs for the project.\n\n---\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiprojectz%2Fsingulargpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhiprojectz%2Fsingulargpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhiprojectz%2Fsingulargpt/lists"}