rwitz commited on
Commit
c01647a
1 Parent(s): f7928a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -80,13 +80,13 @@ def format_prompt(state, bot_index, character_name, character_description, user_
80
  if user_name is None or user_name.strip() == "":
81
  user_name = "You"
82
 
83
- prompt = f"<|im_start|>{character_description}<|im_end|>\n"
84
  for message in state["history"][bot_index]:
85
  if message['role'] == 'user':
86
- prompt += f"<|im_start|>{user_name}: {message['content']}<|im_end|>\n"
87
  else:
88
- prompt += f"<|im_start|>{character_name}: {message['content']}<|im_end|>\n"
89
- prompt += f"<|im_start|>{character_name}:"
90
  return prompt
91
  import aiohttp
92
  import asyncio
 
80
  if user_name is None or user_name.strip() == "":
81
  user_name = "You"
82
 
83
+ prompt = f"{character_description}\n"
84
  for message in state["history"][bot_index]:
85
  if message['role'] == 'user':
86
+ prompt += f"{user_name}: {message['content']}\n"
87
  else:
88
+ prompt += f"character_name}: {message['content']}\n"
89
+ prompt += f"{character_name}:"
90
  return prompt
91
  import aiohttp
92
  import asyncio