Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"
|
84 |
for message in state["history"][bot_index]:
|
85 |
if message['role'] == 'user':
|
86 |
-
prompt += f"
|
87 |
else:
|
88 |
-
prompt += f"
|
89 |
-
prompt += f"
|
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
|