gpt_engineer.core.default.steps.improve_fn
- gpt_engineer.core.default.steps.improve_fn(ai: AI, prompt: Prompt, files_dict: FilesDict, memory: MutableMapping[str | Path, str], preprompts_holder: PrepromptsHolder, diff_timeout=3) FilesDict[source]
Improves the code based on user input and returns the updated files.
- Parameters:
ai (AI) – The AI model used for improving code.
prompt (str) – The user prompt to improve the code.
files_dict (FilesDict) – The dictionary of file names to their respective source code content.
memory (BaseMemory) – The memory interface where the code and related data are stored.
preprompts_holder (PrepromptsHolder) – The holder for preprompt messages that guide the AI model.
- Returns:
The dictionary of file names to their respective updated source code content.
- Return type: