You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError(f"Access to {filename} is restricted by .gitbobignore")
312
312
313
+
more_instructions=""
313
314
created_files= {}
314
315
forattemptinrange(number_of_attempts):
315
316
an_error_happened=False
316
317
317
318
created_files= {}
318
319
original_ipynb_file_content=None
320
+
temp=filename.split("/")
321
+
working_directory="/".join(temp[:-1])
322
+
iflen(working_directory) >0:
323
+
working_directory=working_directory+"/"
324
+
325
+
all_files="""
326
+
## Other files in the repository
327
+
328
+
You are in working directory {working_directory}. When you are writing code that accesses other files, make sure to use the correct relative file-paths.
print(f"Cannot create or modify image files like {filename}.")
323
335
returncreated_files
324
336
eliffilename.endswith('.py'):
325
337
format_specific_instructions=" When writing new functions, use numpy-style docstrings."
326
-
eliffilename.endswith('.ipynb'):
338
+
more_instructions=all_files
339
+
iffilename.endswith('.ipynb'):
327
340
format_specific_instructions=" In the notebook file, write short code snippets in code cells and avoid long code blocks. Make sure everything is done step-by-step and we can inspect intermediate results. Add explanatory markdown cells in front of every code cell. The notebook has NO cell outputs! Make sure that there is code that saves results such as plots, images or dataframes, e.g. as .png or .csv files. Numpy images have to be converted to np.uint8 before saving as .png. Plots must be saved to disk before the cell ends or it is shown. The notebook must be executable from top to bottom without errors. Return the notebook in JSON format!"
341
+
more_instructions=all_files
328
342
eliffilename.endswith('.docx'):
329
343
format_specific_instructions=" Write the document in simple markdown format."
0 commit comments