53 Commits

Author SHA1 Message Date
UmerHA
19a4c10b6e Langchain integration (#512)
* Added LangChain integration

* Fixed issue created by git checkin process

* Added ':' to characters to remove from end of file path

* Tested initial migration to LangChain, removed comments and logging used for debugging

* Tested initial migration to LangChain, removed comments and logging used for debugging

* Converted camelCase to snake_case

* Turns out we need the exception handling

* Testing Hugging Face Integrations via LangChain

* Added LangChain loadable models

* Renames "qa" prompt to "clarify", since it's used in the "clarify" step, asking for clarification

* Fixed loading model yaml files

* Fixed streaming

* Added modeldir cli option

* Fixed typing

* Fixed interaction with token logging

* Fix spelling + dependency issues + typing

* Fix spelling + tests

* Removed unneeded logging which caused test to fail

* Cleaned up code

* Incorporated feedback

- deleted unnecessary functions & logger.info
- used LangChain ChatLLM instead of LLM to naturally communicate with gpt-4
- deleted loading model from yaml file, as LC doesn't offer this for ChatModels

* Update gpt_engineer/steps.py

Co-authored-by: Anton Osika <anton.osika@gmail.com>

* Incorporated feedback

- Fixed failing test
- Removed parsing complexity by using # type: ignore
- Replace every ocurence of ai.last_message_content with its content

* Fixed test

* Update gpt_engineer/steps.py

---------

Co-authored-by: H <holden.robbins@gmail.com>
Co-authored-by: Anton Osika <anton.osika@gmail.com>
2023-07-23 23:30:09 +02:00
UmerHA
8fd315d264 Implemented logging token usage (solves #322) (#438)
* Implemented logging token usage

Token usage is now tracked and logged into memory/logs/token_usage

* Step names are now inferred from function name

* Incorporated Anton's feedback

- Made LogUsage a dataclass
- For token logging, step name is now inferred via inspect module

* Formatted (black/ruff)

* Update gpt_engineer/ai.py

Co-authored-by: Anton Osika <anton.osika@gmail.com>

* formatting

---------

Co-authored-by: Anton Osika <anton.osika@gmail.com>
2023-07-03 21:28:34 +02:00
Anton Osika
20ea0c126a Simplify archiving process (#469)
* simplify args

* Fix tests

* Black format
2023-07-02 16:43:13 +02:00
Anton Azarov
60e0a7e1dd Remove delete_existing option; Introduce archive (#409)
* Remove `delete_existing` option; Introduce archive

* Update gpt_engineer/db.py

* Update gpt_engineer/main.py

* Update gpt_engineer/main.py

* Update gpt_engineer/steps.py

* Update gpt_engineer/steps.py

---------

Co-authored-by: Anton Osika <anton.osika@gmail.com>
2023-07-02 15:56:31 +02:00
Anton Osika
7f16abecb3 Make sure benchmark runs and be more strict about collecting feedback (#397)
* Update benchmark script

* Bump version
2023-06-25 15:53:34 +02:00
Anton Osika
ba33e681df Fix failing tests. Add review step. 2023-06-25 14:03:04 +02:00
Anton Osika
22051774d5 Add types 2023-06-25 11:08:26 +02:00
Anton Osika
2a39cc4cd7 Bugfixes, store output logs 2023-06-25 10:56:56 +02:00
Anton Osika
f159dc45f2 First step in making gpt-engineer learn. Rename main_prompt -> prompt (#381)
* First step in collecting learnings

* Rename prompts

* remove requirements, use pip install -e . instead

* Add requirements

* Fix tests
2023-06-24 17:53:04 +02:00
Philipp Kohler
e53d6f467f fix typos 2023-06-23 10:17:52 +00:00
abdelrhman yasser2020
9bde354940 edit on some typing (#341) 2023-06-23 01:09:18 +02:00
Anton Osika
3cbc43e948 Clarify prompts 2023-06-22 22:04:06 +02:00
Anton Osika
8062d901d1 Apply suggestions from code review 2023-06-22 10:44:34 +02:00
Anton Osika
ed1a7da296 Dont require to be in the same folder as the repo to run, v0.0.5 2023-06-22 10:42:35 +02:00
Anton Osika
11665a54d3 add one step 2023-06-21 19:56:19 +02:00
Daniel McDonald
20415ffd9f fixed typo 'code_ouput' -> 'code_output' (#299) 2023-06-21 18:25:50 +02:00
Daniel McDonald
f5c66ebf0d fixed typo 'parallell' -> 'parallel' (#297) 2023-06-21 16:56:59 +02:00
Anton Osika
40ec83a7c7 Small clarifications 2023-06-21 00:52:36 +02:00
Anton Osika
16dd96f50d Many small improvements, new benchmark results! 2023-06-21 00:37:18 +02:00
Anton Osika
808fc7242d Update respec 2023-06-19 23:38:38 +02:00
Anton Osika
851c6bc999 Run simple per default 2023-06-19 22:31:20 +02:00
Anton Osika
8180f0346c Fix the errors with parsing 2023-06-18 22:34:31 +02:00
Emil Ahlbäck
8b9b018307 fix_code fix 2023-06-18 16:36:41 +02:00
Emil Ahlbäck
3f86b2a33d fix_code 2023-06-18 16:26:03 +02:00
Anton Osika
16a3278ee3 Update benchmarks 2023-06-18 16:16:57 +02:00
Anton Osika
e90ac46fc8 Merge branch 'main' of github.com:AntonOsika/gpt-engineer
* 'main' of github.com:AntonOsika/gpt-engineer:
  Mark test as failed because it requires OpenAI API access currently
  `black`
  Create test_ai.py
  fix to_files
  execute_workspace -> gen_entrypoint; execute_entrypoint
  Ignore my-new-project/
  Added CODE_OF_CONDUCT.md to the .github directory (#147)
  make pre commit pass in the whole codebase (#149)
  Create ci.yaml
  Fix linting
  Add support for directory paths in filenames and improve code splitting - Enforce an explicit markdown code block format - Add a token to split the output to clearly detect when the code blocks start - Save all non-code output to a `README.md` file - Update RegEx to extract and strip text more reliably and clean up the output - Update the identify prompts appropriately
  Enhance philosophy to include supporting documents - Create instructions for running/compiling the project - Create any package manager files
  Generate instructions for all platforms - Update prompt to create instructions for all 3 major OS platforms - Fix small typo
  Add support for directory creation and binary files - Use the `Path` module instead of `os` - Add ability to create any amount of missing directories for a given file - Add ability to save both text and binary files to save images (or other file types) later
  Add cleanup & move `projects` to their own directory - Add optional argument to clean and delete the working directories of the project before running the prompt - Add `.gitignore` entry to ignore all possible projects - Update readme
2023-06-18 15:13:34 +02:00
Carl Thomé
502756bb58 black 2023-06-18 15:04:30 +02:00
Anton Osika
4a212d968d Update benchmarking 2023-06-18 15:02:42 +02:00
Carl Thomé
bac7af55ab execute_workspace -> gen_entrypoint; execute_entrypoint
Clarify semantics that `execute` steps doesn't communicate with the API.
2023-06-18 14:52:42 +02:00
Patilla Code
084ce1759b make pre commit pass in the whole codebase (#149) 2023-06-18 14:46:03 +02:00
Anton Osika
dd7e5c3f7b Merge pull request #140 from EnzoMartin/directory-creation
Directory creation & project directory
2023-06-18 14:26:09 +02:00
Junlin Liu
e58bfff8bb fix execute 2023-06-18 11:44:35 +00:00
Enzo Martin
2f2fef50fe Merge branch 'main' into directory-creation
# Conflicts:
#	.gitignore
#	gpt_engineer/steps.py
#	identity/generate
#	identity/use_qa
2023-06-18 10:18:27 +02:00
Enzo Martin
9c24119f91 Generate instructions for all platforms
- Update prompt to create instructions for all 3 major OS platforms
- Fix small typo
2023-06-18 10:06:17 +02:00
Anton Osika
c6b6ca1448 Fix not generating bash commands 2023-06-18 08:36:34 +02:00
Anton Osika
0d186e22e6 Skip the respec by default, fix that it changed application 2023-06-17 21:55:19 +02:00
Anton Osika
a4019fb82f Black 2023-06-17 21:32:46 +02:00
Anton Osika
8ac2cd81b9 Always generate entrypoint 2023-06-17 21:18:07 +02:00
Anton Osika
4a9ab4647e Execute per default 2023-06-17 20:39:25 +02:00
Anton Osika
e8f47c1e70 improve execution step 2023-06-17 20:36:51 +02:00
Anton Osika
a3cb4964e9 Remove automatic execution for now 2023-06-17 19:52:48 +02:00
Anton Osika
31b00de247 Improve prompts 2023-06-17 19:52:22 +02:00
jjzhuo
cde2595ccc Fix an exception for gpt response with lang=sh (#105) 2023-06-17 16:35:43 +02:00
Emil Ahlbäck
05474e806c make unit tests default 2023-06-17 15:21:13 +02:00
Emil Ahlbäck
6a3f7eb9de fix "no" not working 2023-06-17 14:12:38 +02:00
Anton Osika
5cb6b4539b Execute step 2023-06-17 14:10:29 +02:00
Anton Osika
b07fbe1315 add execute step 2023-06-17 13:52:37 +02:00
Emil Ahlbäck
e2e0942690 fsystem -> fuser, main prompt -> instructions 2023-06-17 13:49:37 +02:00
Anton Osika
7f6cab7aa2 Update gpt_engineer/steps.py 2023-06-17 13:45:03 +02:00
Emil Ahlbäck
d30e079571 add unit_tests files 2023-06-17 13:39:56 +02:00