laxsvips commited on
Commit
4dae8a8
·
1 Parent(s): e6c1709

Update chat.py

Browse files
Files changed (1) hide show
  1. chat.py +2 -1
chat.py CHANGED
@@ -161,7 +161,8 @@ def initialize_game(game_id, user_id, user_input):
161
  return llm_prompt_op.choices[0]["message"]["content"]
162
 
163
  def generate_image_prompt(game_id, user_id, user_input):
164
- 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?', '')
 
165
  payload = list()
166
  file_data = open_file(f"{file_path}/image_prompt_leo.txt").replace("<<PROMPT_FOR_IMG>>", user_input)
167
  leo_input_msg = call_gpt(file_data)
 
161
  return llm_prompt_op.choices[0]["message"]["content"]
162
 
163
  def generate_image_prompt(game_id, user_id, user_input):
164
+ if 'You have a manual' in user_input:
165
+ 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?', '')
166
  payload = list()
167
  file_data = open_file(f"{file_path}/image_prompt_leo.txt").replace("<<PROMPT_FOR_IMG>>", user_input)
168
  leo_input_msg = call_gpt(file_data)