laxsvips commited on
Commit
40f23fd
·
1 Parent(s): 0ca99ec

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +3 -0
chat.py CHANGED
@@ -165,7 +165,10 @@ 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
+ fname="prompt_" + game_id + "_" + user_id + ".txt"
169
+ start_data = openfile(fname)
170
  file_data = open_file(f"{file_path}/image_prompt_leo.txt").replace("<<PROMPT_FOR_IMG>>", user_input)
171
+ file_data = start_data + " " + file_data
172
  leo_input_msg = call_gpt(file_data)
173
  leo_input = leo_input_msg.choices[0].message.content
174
  timestamp_op = time()