Skip to content

Commit

Permalink
Add agents (#25)
Browse files Browse the repository at this point in the history
* Add error handling for generating embeddings

* Change file name of test file

* Add toml config

* Move api key setting into init function

* Analyze & explain commands now stream responses from chatgpt.

* Add vscode lens extraction function

* Update repo to use tree-sitter sql parser

* Remove sqlglot

* Add refactor_code function for vscode ext

* Using queries to find functions instead of manually searching

* Remove code from vscode output

* Ignore parsing hidden directories

* Don't try parsing files that we don't have parsers for

* Ignore filepaths with extensions we can't pass

* Fixed the error where all the changes were getting resaved.

* Ensure that running setup without an existing file still works

* Fix typo

* Add expt with agents

* Add expt with agents

* Add poetry.toml

* Add agents

* Stop warnings in jupyter notebook

* Fix typo

* Add agents

* Temp move pygraphviz to dev dependencies so it doesn't need to be installed in github
  • Loading branch information
shruti222patel authored Nov 8, 2023
1 parent d1c609f commit 79fc663
Show file tree
Hide file tree
Showing 50 changed files with 6,839 additions and 1,395 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,4 @@ fabric.properties

# Can't be having folks committing the crime of sharing their creds
.env
expt/*
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Repo-GPT is a Python CLI tool designed to utilize the power of OpenAI's GPT-3 mo
Repo-GPT can be installed via [pip](https://pip.pypa.io/en/stable/):

```bash
brew install graphviz
pip install repo-gpt
```

Expand Down Expand Up @@ -93,6 +94,16 @@ repo-gpt add-test function_name --test_save_file_path $PWD/test.py --testing_pac
We welcome your contributions! Before starting, please make sure to install Python `3.11` and the latest version of [poetry](https://python-poetry.org/docs/#installing-with-pipx). [Pyenv](https://github.com/pyenv/pyenv) is a convenient tool to manage multiple Python versions on your computer.

Here are the steps to set up your development environment:
0. Install global dependencies:

```shell
nvm use --lts

brew install graphviz
export CFLAGS="-I $(brew --prefix graphviz)/include"
export LDFLAGS="-L $(brew --prefix graphviz)/lib"
pip install poetry
```

1. Export your OpenAI key to your environment variables:

Expand All @@ -104,6 +115,7 @@ Here are the steps to set up your development environment:

```shell
poetry install --no-root
jupyter lab build
```

3. Install pre-commit hooks:
Expand All @@ -129,9 +141,20 @@ Here are the steps to set up your development environment:
You can view the output of the `code_embeddings.pkl` using the following command:

```shell
poetry shell
python
import pandas as pd
pd.read_pickle('./.repo_gpt/code_embeddings.pkl', compression='infer')
```

#### Interpreter
```shell
poetry shell
ipython
%load_ext autoreload
%autoreload 2
```

## Roadmap

Here are the improvements we are currently considering:
Expand All @@ -144,4 +167,7 @@ Here are the improvements we are currently considering:
- [ ] Save # of tokens each code snippet has so we can ensure we don't pass too many tokens to GPT
- [X] Add SQL file handler
- [ ] Add DBT file handler -- this may be a break in pattern as we'd want to use the manifest.json file
- [ ] Create VSCode extension
- [X] Create VSCode extension
- [ ] Ensure files can be added & deleted and the indexing picks up on the changes.
- [ ] Add .repogptignore file to config & use it in the indexing command
- [ ] Use pygments library for prettier code formatting
Loading

0 comments on commit 79fc663

Please sign in to comment.