Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
swyxio committed May 30, 2023
1 parent 921df67 commit 84483fe
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .example.env
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
OPENAI_API_KEY=sk-xxxxxx
ANTHROPIC_API_KEY=sk-ant-api03-xxxxxx
OPENAI_API_KEY=sk-xxxxxx
31 changes: 26 additions & 5 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ There are no python dependencies to wrangle thanks to using Modal as a [self-pro
Unfortunately this project also uses 3 other things:

- Modal.com - [sign up](https://modal.com/signup), then `pip install modal-client`
- Modal helps
- You can run this project w/o Modal following these instructions:
- `pip install -r requirements.txt`
- `export OPENAI_API_KEY=sk-xxxxxx` (your openai api key here)
- `python main_no_modal.py YOUR_PROMPT_HERE`
- GPT-4 api (private beta) - can use 3.5 but obviously wont be as good. we are working on a hosted version so you can try this out on our keys
- (for the demo project only) anthropic claude 100k context api (private beta) - not important unless you're exactly trying to repro my demo
Expand All @@ -142,31 +142,50 @@ the `/examples/exampleChromeExtension` folder contains `a Chrome Manifest V3 ext

this entire extension was generated by the prompt in `prompt.md` (except for the images), and was built up over time by adding more words to the prompt in an iterative process.

## smol dev
## usage: smol dev

basic usage

```bash
# inline prompt
modal run main.py --prompt "a Chrome extension that, when clicked, opens a small window with a page where you can enter a prompt for reading the currently open page and generating some response from openai"
```

after a while of adding to your prompt, you can extract your prompt to a file, as long as your "prompt" ends in a .md extension we'll go look for that file

```bash
# prompt in markdown file
modal run main.py --prompt prompt.md
```

each time you run this, the generated directory is deleted (except for images) and all files are rewritten from scratch.

In the `shared_dependencies.md` file is a helper file that ensures coherence between files.
In the `shared_dependencies.md` file is a helper file that ensures coherence between files. This is in the process of being expanded into an official `--plan` functionality (see https://github.com/smol-ai/developer/issues/12)

### smol dev in single file mode

if you make a tweak to the prompt and only want it to affect one file, and keep the rest of the files, specify the file param:

```bash
modal run main.py --prompt prompt.md --file popup.js
```

## smol debugger
### smol dev without modal.com

By default, `main.py` uses Modal, beacuse it provides a nice upgrade path to a hosted experience (coming soon, so you can try it out without needing GPT4 key access).

However if you want to just run it on your own machine, you can run smol dev w/o Modal following these instructions:

```bash
pip install -r requirements.txt
export OPENAI_API_KEY=sk-xxxxxx # your openai api key here)

python main_no_modal.py YOUR_PROMPT_HERE
```

## usage: smol debugger

*this is a beta feature, very very MVP, just a proof of concept really*

take the entire contents of the generated directory in context, feed in an error, get a response. this basically takes advantage of longer (32k-100k) context so we basically dont have to do any embedding of the source.

Expand All @@ -177,7 +196,9 @@ modal run debugger.py --prompt "Uncaught (in promise) TypeError: Cannot destruct
modal run debugger.py --prompt "your_error msg_here" --model=gpt-4
```

## smol pm
## usage: smol pm

*this is even worse than beta, its kind of a "let's see what happens" experiment*

take the entire contents of the generated directory in context, and get a prompt back that could synthesize the whole program. basically `smol dev`, in reverse.

Expand Down

0 comments on commit 84483fe

Please sign in to comment.