22 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
Sibo Van Gool
ac03a24027 Fix merge conflict (#408) 2023-07-06 22:50:35 +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
2b8e056d5d Add flow to ask for consent to share learnings – finally (#471)
* Consent flow

* Fix pre-commit

* Fix ruff

* Remove codespell

* Remove codespell fully

* whitespace
2023-07-02 19:17:15 +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
--Explosion--
9b86678d61 Allow model string to be changed (Fixes #328) (#329)
* I think this would do it

* Update main.py
2023-06-25 12:43:56 +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
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
16dd96f50d Many small improvements, new benchmark results! 2023-06-21 00:37:18 +02:00
LopeKinz
ac958df8d7 'Refactored by Sourcery' (#188) 2023-06-19 13:26:55 +02:00
Anton Osika
89d9b6e356 Fix some cli stuff 2023-06-18 22:34:31 +02:00
Carl Thomé
38401b2f35 Add --verbose option for logging request/response 2023-06-18 16:21:16 +02:00
Junlin Liu
d237c175cd fix docstring #150 (#152) 2023-06-18 15:36:45 +02:00
Emil Ahlbäck
66cd09c789 fix tuple error 2023-06-18 15:26:54 +02:00
Patilla Code
084ce1759b make pre commit pass in the whole codebase (#149) 2023-06-18 14:46:03 +02:00
Enzo Martin
8b3862d94d Fix linting 2023-06-18 10:34:35 +02:00
Enzo Martin
b97563726f 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 10:05:45 +02:00
Anton Osika
03d8fff5d2 Make steps configurable 2023-06-17 13:02:16 +02:00
Anton Osika
3487363a23 Simplify 2023-06-17 11:04:46 +02:00
Jack Eadie
6f8e976a42 Make gpt-engineer pip installable/runnable (#60) 2023-06-16 13:25:29 +02:00