Skip to content

Commit

Permalink
Cli improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
A-F-V committed Feb 23, 2024
1 parent 39918ea commit ccec8af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@

![Photo](Less%20Code%20Example.PNG)

# Setup
# Running

## Virtual Environment
## Install

```bash
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
```

## Development
## Running

```bash
python cli.py <query> --repo <path to repo you want to execute agent on>
```

# Development

### VSCode Plugins

Expand Down
11 changes: 6 additions & 5 deletions cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ def init_repo(repo: str, folder: str):


@click.command()
@click.argument("query")
@click.option("--repo", default="./demo", help="The repo to download")
def run(repo: str):
def run(query, repo: str):

click.echo("Running the demo")
# click.echo("Running the demo")

code_path = "edit_distance/edit_distance.py"
query = f"In the file {code_path}, there is function called `lowest_...`. Edit the function by using better names for the variables. Do not rename the function"
# code_path = "edit_distance/edit_distance.py"
# query = f"In the file {code_path}, there is function called `lowest_...`. Edit the function by using better names #for the variables. Do not rename the function"

context = ProjectContext(
folder_path=repo,
eval_project_id="demo_eval_short_thoughts_with_action_groundedness",
eval_project_id="demo",
)
agent = RefactoringAgent()
click.echo(state_to_str(agent.run(query, context)))
Expand Down

0 comments on commit ccec8af

Please sign in to comment.