Spaces:
Build error
Build error
jjz5463 commited on
Commit ·
f371bf3
1
Parent(s): 03f43d0
update invalid input check
Browse files- chatbot_simulator.py +1 -0
- prompts.py +2 -1
chatbot_simulator.py
CHANGED
|
@@ -77,6 +77,7 @@ class ChatbotSimulation:
|
|
| 77 |
return get_system_prompt(app_name=self.app_name,
|
| 78 |
app_description=self.app_description,
|
| 79 |
relevant_database=relevant_database,
|
|
|
|
| 80 |
task=self.task,
|
| 81 |
current_page=current_page,
|
| 82 |
last_page=last_page,
|
|
|
|
| 77 |
return get_system_prompt(app_name=self.app_name,
|
| 78 |
app_description=self.app_description,
|
| 79 |
relevant_database=relevant_database,
|
| 80 |
+
user_state=self.user_state,
|
| 81 |
task=self.task,
|
| 82 |
current_page=current_page,
|
| 83 |
last_page=last_page,
|
prompts.py
CHANGED
|
@@ -1,12 +1,13 @@
|
|
| 1 |
import textwrap
|
| 2 |
|
| 3 |
|
| 4 |
-
def get_system_prompt(app_name, app_description, relevant_database, task,
|
| 5 |
current_page, last_page, actions, sitemap_page, jinjia_prerender):
|
| 6 |
system_prompt = textwrap.dedent(f"""
|
| 7 |
You are a text-based CLI {app_name} ({app_description}) simulator.
|
| 8 |
The {app_name} app contains the following database tables: {relevant_database}.
|
| 9 |
You are interacting with a user whose task is: {task}.
|
|
|
|
| 10 |
The user's last page was {last_page}, and they have taken the following actions: {actions}.
|
| 11 |
After performing the most recent action, the user is now on the {current_page} page.
|
| 12 |
|
|
|
|
| 1 |
import textwrap
|
| 2 |
|
| 3 |
|
| 4 |
+
def get_system_prompt(app_name, app_description, relevant_database, user_state, task,
|
| 5 |
current_page, last_page, actions, sitemap_page, jinjia_prerender):
|
| 6 |
system_prompt = textwrap.dedent(f"""
|
| 7 |
You are a text-based CLI {app_name} ({app_description}) simulator.
|
| 8 |
The {app_name} app contains the following database tables: {relevant_database}.
|
| 9 |
You are interacting with a user whose task is: {task}.
|
| 10 |
+
User's current state: {user_state}.
|
| 11 |
The user's last page was {last_page}, and they have taken the following actions: {actions}.
|
| 12 |
After performing the most recent action, the user is now on the {current_page} page.
|
| 13 |
|