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,
)`
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.