Commit Graph

86 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
OriAshkenazi
a55265ddb4 changed fallback model to 3.5-turbo-16k 2023-07-05 13:18:12 +03: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
2ffd92b180 Drop used for security=False 2023-07-02 17:37:14 +02:00
Nitaym
24fef650ba Python 3.8 support + Cleaning up some issues in extracting files out of the prompts (#355)
* Changed typing to fit python 3.8

* Made sure GPT won't add in comments about the files as these confuse the chat-to-files regex
2023-07-02 17:05:09 +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
Fathi Helmi
14ae0e7d0e remove a duplicate phrase from the prompt (#446) 2023-07-02 15:22:55 +02:00
Gamekiller48
6e6d312041 changed feedback collection from opt-out to opt-in (#423)
Co-authored-by: Vincent Desktop <soellner.vincent@gmail.com>
2023-06-27 14:40:11 +02:00
Leonardo Mariga
1c8c1f5bb5 Clarify missing file error (#384) 2023-06-25 16:44:37 +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
b09f0e9193 Fix utc timestamp 2023-06-25 14:03:04 +02:00
Anton Osika
ba33e681df Fix failing tests. Add review step. 2023-06-25 14:03:04 +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
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
Plamen Ivanov
1b2831ab85 Refactoring and suggestions (#334) 2023-06-23 12:01:29 +02: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
David Cameron
0d0aaaa9b0 Handle newlines between filename (#250) 2023-06-20 18:43:12 +02:00
Mendie Uwemedimo
f2525405b0 enabled compatiblilty with python versions <3.9 (#254) 2023-06-20 18:04:44 +02:00
David Cameron
9b3db78b95 Additional filename handling (#221) 2023-06-20 12:09:28 +02:00
Romain d'Esparbès
698eb8a6fd Add mypy (#224) 2023-06-20 11:50:48 +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
052556dfff Merge pull request #173 from davejcameron/dc-fix-chat-to-files-bracket
Fix square bracket file name issue
2023-06-19 15:49:21 +02:00
LopeKinz
ac958df8d7 'Refactored by Sourcery' (#188) 2023-06-19 13:26:55 +02:00
David Cameron
613aab8ef7 Fix square bracket file name issue 2023-06-19 07:07:59 -04:00
Anton Osika
8180f0346c Fix the errors with parsing 2023-06-18 22:34:31 +02:00
Anton Osika
89d9b6e356 Fix some cli stuff 2023-06-18 22:34:31 +02:00
Carl Thomé
b0ea7b0b41 kwargs -> temperature 2023-06-18 16:42:53 +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
Carl Thomé
38401b2f35 Add --verbose option for logging request/response 2023-06-18 16:21:16 +02:00
Anton Osika
16a3278ee3 Update benchmarks 2023-06-18 16:16:57 +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
Anton Osika
2e4baf7fe1 Update benchmarking 2023-06-18 15:16:20 +02:00
Carl Thomé
502756bb58 black 2023-06-18 15:04:30 +02:00