Use a model of your choice, and give it superpowers with GPT Programmer. It allows the LLM to interact with:
- use node version 21.7.1 (with
npm i -g yarn
) - Either:
- (Free) Open LM Studio, go to search and find a model you would like to use and then go to
Local Server
, load the model andStart Server
. - (Rich people) Configure
src/config.ts
to use OpenAI API
- (Free) Open LM Studio, go to search and find a model you would like to use and then go to
- Run
yarn
to install the dependencies
- Run
yarn start
to start the API that will interact with the model
- Create UI for using the application
- Add a way to select the model and directory to work in (default: tmp dir)
- Add a way to select the action (default write task list)
- Visualization of what's going on inside the directory
- Add more return types to make the tester better
- Improve contexts and add more regression tests
- Add possibility for the model to interact with the filesystem (read, write, delete files and directories, preferably in a sandbox new directory - might be tricky to edit projects later) with actions.
- Add an organizer action that will be able to call other actions in the system.
- Refactor
Api.ts
so that the development section is easier to extend, and each action is in a separate file. - Add a way to run commands on the host system.
- Add a way to list google search results.
- Add a way to visit websites (beautifully souped most probably) and return the content.
- Add easy regression testing for all actions
- Add
GetTree
action that will return a tree of the filesystem at the given path. - Make the
WriteTaskList
action ability to edit an already established project. - Add a Tester action that will verify that the previous action from the
TaskList
was successful or not. If it's not successful, it will try to run the action again.
If you would like to add a new action for the model, follow these steps:
For adding action AbcdAction:
- Create a file with context for the bot of your action to
./src/domain/contexts/AbcdAction
. - Add required stuff to
src/domain/actions/index.ts
. - Create
src/domain/actions/AbcdAction.ts
with a functionAbcdAction
that will returnStandardAction
instance.- Example of action that will return some data can be found at
src/domain/actions/ListDirs.ts
. - Example of action that will not return any data can be found at
src/domain/actions/WriteFile.ts
.
- Example of action that will return some data can be found at
- Create a getter for the action in
src/domain/Api.ts
, - Add a case to the switch statement in
src/main.ts
to handle the action. Add return data if the action returns something. - Finally, add invokation of this action to
src/domain/contexts/WriteTaskList
context.