Open better629 opened 1 year ago
Hi, in most cases, the gpt response contains strings like Instruction: xxx\nInput: xxx
. So we use re.search(r"Instruction: (.+)\n", raw_instructions)
to extract the generated instruction.
However, in some cases, the response will not contain the string Instruction:
and Input:
, so we discard the generated rsponse by return []
. Hope this addresses your concerns.
@YJiangcm
I think maybe the prompt Instruction: xx\nInput: <noinput>\n\n#Created Prompt#
to the gpt is not directly( I have tried times, but can't response as except). Maybe update the prompt like ask it to generate new prompt as your format is more helpful.
in function
post_process_gpt3_response
raw_instructions
is the response ofchatgpt
. And it uses string likeInstruction: xx\nInput: <noinput>\n\n#Created Prompt#
to call gpt to generate new instruction. But it seems that it won't containInstruction:
in the gpt response, only thenew instruction
. So it will allways return [] and cause while loop never stop.Is there a problem or not? @YJiangcm