smol-ai / developer

the first library to let you embed a developer agent in your own app!
https://twitter.com/SmolModels
MIT License
11.79k stars 1.03k forks source link

feat: USE_FULL_PROJECT_PROMPT + extracting code from ``` #105

Open goooseman opened 1 year ago

goooseman commented 1 year ago

Changes:

  1. USE_FULL_PROJECT_PROMPT env var. If enabled for each file generation prompt we will include all the files generated before
  2. Sometimes GPT-3.5 still returns some words around the content of the file. This change extracts code from ``` blocks.
  3. OPENAI_DEFAULT_MODEL and OPENAI_DEFAULT_MAX_TOKENS env vars added

The change is tested with USE_FULL_PROJECT_PROMPT=True OPENAI_DEFAULT_MODEL=gpt-3.5-turbo-16k-0613 OPENAI_DEFAULT_MAX_TOKENS=9000 and USE_FULL_PROJECT_PROMPT makes a big change for small projects. My generated project is ~5000 tokens, so I'm safe to include full project files in the prompt.

coditamar commented 1 year ago

@CodiumAI-Agent please review

CodiumAI-Agent commented 1 year ago

PR Analysis

How to use

Tag me in a comment '@CodiumAI-Agent' to ask for a new review after you update the PR. You can also tag me and ask any question, for example '@CodiumAI-Agent is the PR ready for merge?'