handle /path/to

This commit is contained in:
Paul Gauthier 2023-06-24 20:05:35 -07:00
parent fe3f1c194d
commit b1cdb9d488

View file

@ -66,6 +66,10 @@ class WholeFileCoder(Coder):
# fname==None ... starting a new block
if i > 0:
fname = lines[i - 1].strip()
path_to = "/path/to/"
# gpt-3.5 will sometimes crib /path/to from the one-shot example
if fname.startswith(path_to) and fname not in chat_files:
fname = fname[len(path_to) :]
if not fname: # blank line? or ``` was on first line i==0
if saw_fname:
fname = saw_fname