{"id":13492766,"url":"https://github.com/ishan0102/vimGPT","last_synced_at":"2025-03-28T10:32:58.306Z","repository":{"id":206305574,"uuid":"715367684","full_name":"ishan0102/vimGPT","owner":"ishan0102","description":"Browse the web with GPT-4V and Vimium","archived":false,"fork":false,"pushed_at":"2024-04-26T19:20:09.000Z","size":52,"stargazers_count":2568,"open_issues_count":14,"forks_count":194,"subscribers_count":27,"default_branch":"main","last_synced_at":"2024-08-01T19:44:28.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/ishan0102.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["ishan0102"]}},"created_at":"2023-11-07T02:03:51.000Z","updated_at":"2024-08-01T19:24:48.000Z","dependencies_parsed_at":"2023-11-08T23:31:35.640Z","dependency_job_id":"62834695-a9cf-45da-9a36-ee36cafdb22d","html_url":"https://github.com/ishan0102/vimGPT","commit_stats":null,"previous_names":["ishan0102/vimgpt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan0102%2FvimGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan0102%2FvimGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan0102%2FvimGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ishan0102%2FvimGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ishan0102","download_url":"https://codeload.github.com/ishan0102/vimGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222369838,"owners_count":16973287,"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":[],"created_at":"2024-07-31T19:01:08.961Z","updated_at":"2024-10-31T06:31:32.933Z","avatar_url":"https://github.com/ishan0102.png","language":"Python","funding_links":["https://github.com/sponsors/ishan0102"],"categories":["Python","NLP","Learning","Repos","多模态大模型","Web Automation and UI Interaction","AI Web Automation Tools","AI Tools"],"sub_categories":["3. Pretraining","Repositories","资源传输下载","Browser Automation","Computer-use Agents"],"readme":"# vimGPT\nGiving multimodal models an interface to play with.\n\nhttps://github.com/ishan0102/vimGPT/assets/47067154/467be2ac-7e8d-47de-af89-5bb6f51c1c31\n\n## Overview\nLLMs as a way to browse the web is being explored by numerous startups and open-source projects. With this project, I was interested in seeing if we could only use [GPT-4V](https://openai.com/research/gpt-4v-system-card)'s vision capabilities for web browsing.\n\nThe issue with this is it's hard to determine what the model wants to click on without giving it the browser DOM as text. [Vimium](https://vimium.github.io/) is a Chrome extension that lets you navigate the web with only your keyboard. I thought it would be interesting to see if we could use Vimium to give the model a way to interact with the web.\n\n## Usage\nInstall Python requirements:\n```\npip install -r requirements.txt\n```\n\nDownload Vimium locally (have to load the extension manually when running Playwright):\n```\n./setup.sh\n```\n\nRun the script:\n```\npython main.py\n```\n\n## Voice Mode\nVoice Mode: Engage with the browser using voice commands. Simply say your objective, and watch vimGPT perform actions in real-time.\n```\npython main.py --voice\n```\n\n## Ideas\nFeel free to collaborate with me on this, I have a number of ideas:\n- Use [Assistant API](https://platform.openai.com/docs/assistants/overview) once it's released for automatic context retrieval. The Assistant API will create a thread that we can add messages too, to keep the history of actions, but it doesn't support the Vision API yet.\n- Vimium fork for overlaying elements. A specialized version of Vimium that selectively overlays elements based on context could be useful, effectively pruning based on the user query. Might be worth testing if different sized boxes/colors help.\n- Use higher resolution images, as it seems to fail at low res. I noticed that below a certain threshold, the model wouldn't detect anything. This might be improved by using higher resolution images but that would require more tokens.\n- Fine-tune [LLaVa](https://github.com/haotian-liu/LLaVA) or [CogVLM](https://github.com/THUDM/CogVLM) to do this or [Fuyu-8B](https://www.adept.ai/blog/fuyu-8b). Could be faster/cheaper. CogVLM can accurately specify pixel coordinates which may be a good way to augment this.\n- Use JSON mode once it's released for Vision API. Currently the Vision API doesn't support JSON mode or function calling, so we have to rely on more primitive prompting methods.\n- Have the Vision API return general instructions, formalized by another call to the JSON mode version of the API. This is a workaround for the JSON mode issue but requires another LLM call, which is slower/more expensive.\n- Add speech-to-text with Whisper or another model to eliminate text input and make this more accessible.\n- Make this work for your own browser instead of spinning up an artificial one. I want to be able to order food with my credit card.\n- Provide the frames with and without Vimium enabled in case the model can't see what's under the yellow square.\n- Pass the Chrome accessibility tree in as input in addition to the image. This provides a layout of interactive elements that can be mapped to the Vimium bindings.\n- Have it write longer things based on the context of the page or return information to the user based on the query. Examples are replying to an email, summarizing a news article, etc. Visual question answering.\n- Make this a useful tool for blind people by adding voice mode and a key that creates an Assistant API for a given page. Something where you can \"speak to an agent\" about a page content in natural language.\n- Use Javascript to label DOM elements with colored boxes, similar to [this](https://x.com/DivGarg9/status/1659270501498523648?s=20).\n- Build a graph-based retry mechanism that makes sure we aren't falling into cycles, i.e. recursively clicking on the same element.\n\n## Shoutouts\n- HackerNews: https://news.ycombinator.com/item?id=38200308\n- VisualWebArena - Evaluating Multimodal Agents on Realistic Visual Web Tasks (page 9): https://arxiv.org/abs/2401.13649\n- WIRED: https://www.wired.com/story/fast-forward-tested-next-gen-ai-assistant/\n\n## References\n- https://github.com/Globe-Engineer/globot\n- https://github.com/nat/natbot\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishan0102%2FvimGPT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fishan0102%2FvimGPT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fishan0102%2FvimGPT/lists"}