gpt-engineer icon indicating copy to clipboard operation
gpt-engineer copied to clipboard

A way to continue when it stops?

Open zerofill opened this issue 1 year ago • 7 comments

Is there a way to have it continue where it left off? Using gpt3.5-turbo

But when it is creating the files, it will finish in the middle of creating a file. Typically you can tell ChatGPT to continue. Is there a method to do that?

zerofill avatar Jun 14 '23 05:06 zerofill

good

IrmaEdmund avatar Jun 14 '23 12:06 IrmaEdmund

+1

gartlans avatar Jun 15 '23 07:06 gartlans

+1

jebarpg avatar Jun 15 '23 07:06 jebarpg

+1

deronkel82 avatar Jun 15 '23 16:06 deronkel82

+1

augusto-rehfeldt avatar Jun 15 '23 23:06 augusto-rehfeldt

Yeah that is what I am trying now, to see what happens.

zerofill avatar Jun 16 '23 10:06 zerofill

+1

manoocher avatar Jun 26 '23 13:06 manoocher

I have been testing your app with a complex prompt. ChatGPT returns only a few files saying that the app is too complex and will need to continue writing the app after it's initial results.

That would require ChatGPT to see the files it has already written and continue writing the app, almost like a AutoGPT feature.

Is that something you can do?

alexk1919 avatar Jul 03 '23 20:07 alexk1919

you need to use the API to create multiple instance request to call back the last input message with a whole list of messages as a format.

Example:

 import openai

openai.api_key = 'YOUR_API_KEY'

def continue_chat(prompt, messages):
    response = openai.Completion.create(
        engine='davinci-codex',  # Use gpt3.5-turbo for shorter response times
        prompt=prompt,
        messages=messages,
        max_tokens=50  # Adjust the value as per your requirements for your GPT
    )
    return response.choices[0].text.strip()

prompt = "continue chat returns input to prompts/messages"
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "What happens next?"},
]

response = continue_chat(prompt, messages)
print(response


The continue_chat function now takes messages and prompts and messages as input values then returns them as a generated response .then for messages=messages, you can make a list of generated callbacks/answers/ to continue the conversation.

Now your GPT has the ability to continue the conversation where its left off. ( Just don't be like me and try to give it ethical philosphies to take over the world..) - (TROLLING)

hope this helps all you though - if you have any questions feel free to ask. I have an updated GPT-engineer i'll be adding here soon which is a lot cleaner and has error handling with a few other features that were missing imo from most GPT-engineers I've seen on here so far from people. APPRECIATE ALL THE COOL STUFF EVERYONE DOES GOD BLESS YALL <3

vVv-Keys avatar Jul 04 '23 08:07 vVv-Keys

Feel free to add to ideas in discussions

AntonOsika avatar Jul 08 '23 14:07 AntonOsika