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
raw_instructions is the response of chatgpt.
And it uses string like Instruction: xx\nInput: <noinput>\n\n#Created Prompt# to call gpt to generate new instruction.
But it seems that it won't contain Instruction: in the gpt response, only the new instruction. So it will allways return [] and cause while loop never stop.
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 like
Instruction: xx\nInput: <noinput>\n\n#Created Prompt#
to call gpt to generate new instruction.But it seems that it won't contain
Instruction:
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
The text was updated successfully, but these errors were encountered: