laxsvips commited on
Commit
9cae30a
·
1 Parent(s): b0c97c0

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +2 -1
chat.py CHANGED
@@ -165,7 +165,8 @@ def generate_image_prompt(game_id, user_id, user_input):
165
  if 'You have a manual' in user_input:
166
  user_input = user_input.replace('You have a manual of this newly created simulation in your mind. Now what is the first thing you will do in this world?', '')
167
  payload = list()
168
- file_data = open_file(f"{file_path}/image_prompt_leo.txt").replace("<<PROMPT_FOR_IMG>>", user_input)
 
169
  leo_input_msg = call_gpt(file_data)
170
  leo_input = leo_input_msg.choices[0].message.content
171
  timestamp_op = time()
 
165
  if 'You have a manual' in user_input:
166
  user_input = user_input.replace('You have a manual of this newly created simulation in your mind. Now what is the first thing you will do in this world?', '')
167
  payload = list()
168
+ prompt_data = "Your response should not contain any double quotes or colons or headers. Write a 50 word description of the scene. <<PROMPT_FOR_IMG>>"
169
+ file_data = prompt_data.replace("<<PROMPT_FOR_IMG>>", user_input)
170
  leo_input_msg = call_gpt(file_data)
171
  leo_input = leo_input_msg.choices[0].message.content
172
  timestamp_op = time()