https://github.com/greshake/Alice Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Education + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this user All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} greshake / Alice Public * Notifications * Fork 0 * Star 27 Giving ChatGPT access to a real terminal License GPL-3.0 license 27 stars 0 forks Star Notifications * Code * Issues 0 * Pull requests 0 * Actions * Projects 0 * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Security * Insights greshake/Alice This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 1 branch 0 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/g] Use Git or checkout with SVN using the web URL. [gh repo clone gresha] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @greshake greshake Update README.md ... c18c274 Dec 5, 2022 Update README.md c18c274 Git stats * 9 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time screenshots add a screenshot Dec 5, 2022 Dockerfile Initial commit Dec 5, 2022 LICENSE Create LICENSE Dec 5, 2022 README.md Update README.md Dec 5, 2022 alice.py Initial commit Dec 5, 2022 View code Alice Disclaimer-avalanche Example Questions: Control loop Aren't you worried this will escape the sandbox? Limitations/Failure Cases: README.md Alice Giving ChatGPT access to a real terminal..? Browsing: enabled Using lots of prompt injections to convince ChatGPT that it can actually operate a computer, and using it to perform real-world tasks. Just ask Alice/ChatGPT for what you want to get done, it will generate the commands to do it, and use the feedback from those commands to either execute more (like installing dependencies etc) or finish with a user-facing natural language summary of the action performed. It can use internet queries, manipulate files, explore the system on it's own or anything else possible in a terminal to fulfill the user prompt. It is not very successful at solving and executing tasks which take many steps yet. This version does not run out of the box, as OpenAI has not released an API and I'm not publishing a reversed API. If that changes in the future there will be installation & use instructions. If you want to use it already, you have to make it work yourself- which may or may not violate OpenAI ToS. Disclaimer-avalanche Disclaimer 0: All executed commands and returned content should be checked by the user. Disclaimer 1: This will probably not replace you yet. Currently it's more akin to a better tldr which can also execute for you. Disclaimer 2: This is just me frantically experimenting with ChatGPT. Example Questions: * What is the CPU model and GPU? * Hey, can you check if there is a trash.txt file in the current directory and if there is, delete it? Let me known if it was there or not. * Hey, I would like you to build me a basic flask hello world application in the subfolder web unattended. Just execute the commands to get it done and give me a report at the end! * Find files on this computer relating to * Firefox is not responding. Can you help me? * What is the current stock price of Apple? (it usually tries to curl relevant information) Control loop At every step, additional text is inserted to force ChatGPT to engage in this format of use (like a BNF-style grammar). 1. User enters a prompt 2. Model provides one or more terminal commands to accomplish prompt, or a natural language response 3. Commands are executed one after the other, you should be able to skip/accept/deny 4. When commands are done executing, status code + stdout/err goes back to the language model 5. ChatGPT can correct for encountered errors (new commands) or provide a natural language summary of the results. Aren't you worried this will escape the sandbox? After a ot of experimentation, I don't think ChatGPT is able to do this. It fails at complex tasks. But we need to think about what happens with the next version... Let this be a reminder, it's inevitable if these models are continued, right? Alignment seems to become more and more important. Limitations/Failure Cases: * ChatGPT confabulates terminal output * It adds unnecessary explanations that pollute the bash commands * It only very rarely responds with multiple command plans after another if something fails or information is missing. * ChatGPT keeps insisting that it doesn't actually have access to a computer. This is sort of reduced with all the magic strings that are injected to convince it that it's possible. Another example: Real-world example) About Giving ChatGPT access to a real terminal Topics gptchat Resources Readme License GPL-3.0 license Stars 27 stars Watchers 1 watching Forks 0 forks Releases No releases published Packages 0 No packages published Languages * Python 96.3% * Dockerfile 3.7% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.