Skip to content

Commit

Permalink
remove print, ask for specific examples
Browse files Browse the repository at this point in the history
  • Loading branch information
erexer committed Jan 20, 2025
1 parent 79c18b6 commit 5678e2d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions format_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ def get_file_contents(path='.'):
get_file_contents(full_path)
else:
_, file_extension = os.path.splitext(filename)
print(file_extension)
if (".ipynb" or ".py") in file_extension:
with open(full_path) as f:
file_contents.update({filename: f.read()})


get_file_contents()
print(f"Found the following files: {file_contents.keys()}")
print(f"Found the following files: {list(file_contents.keys())}")

try:
os.environ["AZURE_OPENAI_API_KEY"]
Expand Down Expand Up @@ -50,7 +49,7 @@ def get_file_contents(path='.'):
ai_msg = chain.invoke(
{
"language": "Python",
"input": f"Go through all the scripts in the following dictionary of scripts and provide detailed feedback and suggestions on how to make the scripts easier to read, cleaner, and more reproducible: {file_contents}",
"input": f"Go through all the scripts in the following dictionary of scripts and provide detailed feedback and suggestions on how to make the scripts easier to read, cleaner, and more reproducible. Provide specific examples and reference code blocks: {file_contents}",
}
)

Expand Down

0 comments on commit 5678e2d

Please sign in to comment.