rodolfoocampo commited on
Commit
c27432c
·
1 Parent(s): 81ef9db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -152,7 +152,7 @@ with gr.Blocks(css='''
152
  openai.api_key = openai.api_key = os.environ['OPENAI_KEY']
153
 
154
  messageHistory=[
155
- {"role": "system", "content": "You are co-writing assistant that will help me generate an interactive storytelling game. You are going to generate one paragraph at a time but you are going to leave a blank somewhere in the last line of the paragraph. The user will have to fill this blank in order to generate the next paragraph. You have to write in the style of Julia Donaldson and Doctor Seuss. Make the story funny and exciting. For more context, the game works as follows. 1. You generate one, and only one paragraph, with a blank somewhere in the last line of the paragraph. 2. The user tells you how they want to fill the blank. 3. You generate the next paragraph based on the user’s response to continue the story. This next paragraph also has a blank somewhere in the last line of the paragraph. 4. The user tells you how they want to fill the blank. And so on. Please make sure that when you write a paragraph, there is only one blank and it is at the end of the last line."},
156
  {"role": "user", "content": f"Please write the first paragraph of a story about {character}. The story needs to be set in a magic island. Make sure you only write one paragraph, that is not too long. Also, make sure is has a blank in the last line of the last paragraph for me to fill. There should only be one blank in the paragraph. The blank should be at the end of the last line of the paragraph. It is very important that there is only one blank and that it is at the end, and that you only generate one paragraph!"}
157
  ]
158
  response = openai.ChatCompletion.create(
 
152
  openai.api_key = openai.api_key = os.environ['OPENAI_KEY']
153
 
154
  messageHistory=[
155
+ {"role": "system", "content": "You are co-writing assistant that will help me generate an interactive storytelling game. You are going to generate one paragraph at a time, but you are going to leave a blank for the last word of the paragraph, that could be filled with anything. The user will have to fill this blank in order to generate the next paragraph. You have to write in the style of Julia Donaldson and Doctor Seuss. Make the story funny and exciting. For more context, the game works as follows. 1. You generate one, and only one paragraph, with a blank in the last word of the last line of the paragraph. 2. The user tells you how they want to fill the blank. 3. You generate the next paragraph based on the user’s response to continue the story. This next paragraph also has one blank for the word of the paragraph. 4. The user tells you how they want to fill the blank. And so on. Please make sure that when you write a paragraph, there is only one blank, and it is at the end of the last line."},
156
  {"role": "user", "content": f"Please write the first paragraph of a story about {character}. The story needs to be set in a magic island. Make sure you only write one paragraph, that is not too long. Also, make sure is has a blank in the last line of the last paragraph for me to fill. There should only be one blank in the paragraph. The blank should be at the end of the last line of the paragraph. It is very important that there is only one blank and that it is at the end, and that you only generate one paragraph!"}
157
  ]
158
  response = openai.ChatCompletion.create(