ArcAngelGPT icon indicating copy to clipboard operation
ArcAngelGPT copied to clipboard

handle multiple code blocks in the same response.

Open 1advent opened this issue 3 years ago • 4 comments

So for instance, if chatgpt comes up with a solution that requires multiple files to execute (sometimes happens) it should be able to handle those responses.

Maybe the way to do it is to loop through the feedback and find each and handle them that way.

1advent avatar Apr 25 '23 15:04 1advent

What I was thinking was to detect the ``` then run the prompt through ChatGPT again. We can prompt chat to remake the prompt as a json string of steps. like [Step1, step2, step3]. And then we can have python execute each step in the array until the array length is 0.

CryptoDevWill avatar Apr 25 '23 17:04 CryptoDevWill

The regex should be done in such a way it can catch them all anyway, we shouldn't need to run it back through. Like match[1] and match[0] then for each do: stuff like making fine, determining type and finally saving it

Sorry, on the phone rn

On Tue, Apr 25, 2023, 10:30 AM CryptoDevWill @.***> wrote:

What I was thinking was to detect the ``` then run the prompt through ChatGPT again. We can prompt chat to remake the prompt as a json string of steps. like [Step1, step2, step3]. And then we can have python execute each step in the array until the array length is 0.

— Reply to this email directly, view it on GitHub https://github.com/CryptoDevWill/ArcAngelGPT/issues/10#issuecomment-1522161192, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJARVSKPKH4ESRQHUIJ24TXDAC4BANCNFSM6AAAAAAXLETY3I . You are receiving this because you authored the thread.Message ID: @.***>

1advent avatar Apr 25 '23 17:04 1advent

Yeah I agree. I think the first step is to get chat to recognize the ``` then from there we can have python breakdown the response. So basicly when chat sends a response that has ticks in it, python will recognize it and create an array of steps from the ticks. Or something like that

CryptoDevWill avatar Apr 25 '23 18:04 CryptoDevWill

yes sir.

On Tue, Apr 25, 2023 at 11:34 AM CryptoDevWill @.***> wrote:

Yeah I agree. I think the first step is to get chat to recognize the ``` then from there we can have python breakdown the response. So basicly when chat sends a response that has ticks in it, python will recognize it and create an array of steps from the ticks. Or something like that

— Reply to this email directly, view it on GitHub https://github.com/CryptoDevWill/ArcAngelGPT/issues/10#issuecomment-1522235134, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWJARVRWNMIENMDD5C4SX7LXDAKL5ANCNFSM6AAAAAAXLETY3I . You are receiving this because you authored the thread.Message ID: @.***>

1advent avatar Apr 25 '23 19:04 1advent