smol-ai / developer

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

filepaths error #40

Open mxn2020 opened 1 year ago

mxn2020 commented 1 year ago

For more complex file structures the app runs into errors because it cannot read the filepaths from the filepath string. In order to avoid a filepaths error i would suggest modyfing the filepaths prompt as below. It worked for me much better.

`# call openai api with this prompt filepaths_string = generate_response( """You are an AI developer who is trying to write a program that will generate code for the user based on their intent.

When given their intent, create a complete, exhaustive list of files including their paths that the user would write to make the program.

Prepare your respone in below format:

"['file1.txt', 'file2.txt', 'folder1/file3.txt', 'folder1/file4.txt', 'folder1/folder2/file5.txt', 'folder1/folder2/file6.txt']"

do not add any further explanation for automatic processing.
""",
    prompt,
)`
swyxio commented 1 year ago

thank you! adding to todos