jataware / archycoder

demo of interactive programming with GPT-4
1 stars 0 forks source link

ArchyCoder

Interactive coding session with GPT-4

Demo

Short demo of using ArchyCoder interactively to help edit an existing python file.

Watch the video
click to watch original video on youtube

Getting Started

  1. Install dependencies

    pip install -r requirements.txt
  2. Set openai api key:

    export OPENAI_API_KEY="sk-..."
  3. Run the demo

    python coder.py [file_to_edit.py]
    • Input the name of a file that you want the AI edit. if it doesn't exist, it will be created at the specified path.
  4. Run the chat window: http://127.0.0.1:5000

    • You can ask the assistant to write programs, which will then show up in your file via git-style conflict markers (e.g. <<<<<<<, =======, >>>>>>>)
    • The AI can see edits you make to the file, and will adjust its outputs accordingly
    • If you want the AI to see any errors, or results from running the code, you have to copy it into the chat window

Tips