I can't get coding to give me full and complete code

Here is what is in my custom instructions:
Always provide me with the entire, fully integrated runnable code snippet or program to accomplish the task I’ve asked for. This code must include all function definitions, variable declarations, logic, and error handling necessary for independent execution. Do not include comments other than explaining what something does or any other placeholders, or any other omissions. Complete and fully functional code.

It goes ignored and for example gives me code like this:
def rename_folders(top_folder):
# … [No changes here]

def organize_folders(root_dir):
if not os.path.exists(root_dir): # Check if path exists
print(f"The path {root_dir} does not exist.")
return

# ... [No changes here]

def rename_folders2(top_folder):
# … [No changes here]

I prompt it to say complete code and it still doesn’t work 9 times out of 10.

I want a way to consistently get whole code back for a subroutine, function or whole program unless I specify otherwise.

I have found no consistent way to get it to do it - it will often say I understand what you want and I will give you the full code without any placeholders then go ahead and give me placeholders anyway… garrr

Any help appreciated on this. I have a paid account and do coding a lot in all different languages - it is not unique to any one language.

Thanks

Paul

1 Like

The reason this happens is because it tries to deliver a fully rounded result within the constraints of it’s token limit. Try these instructions to alleviate this struggle…

“Please provide code for the functions required to complete my request.”

“Please print the updated script file in full.”

“Please integrate those changes into an updated file.”