Spaces:
Sleeping
Sleeping
Add missing system prompt
Browse files
app.py
CHANGED
|
@@ -369,15 +369,6 @@ Your Character: {character['name']}
|
|
| 369 |
}
|
| 370 |
}
|
| 371 |
|
| 372 |
-
#system_prompt = """You are an AI Game master. Your job is to write what \
|
| 373 |
-
#happens next in a player's adventure game.\
|
| 374 |
-
#Instructions: \
|
| 375 |
-
#You must on only write 1-3 sentences in response. \
|
| 376 |
-
#Always write in second person present tense. \
|
| 377 |
-
#Ex. (You look north and see...) \
|
| 378 |
-
#Don't let the player use items they don't have in their inventory.
|
| 379 |
-
#"""
|
| 380 |
-
|
| 381 |
def is_safe(message, policy_name="Safe"):
|
| 382 |
"""Check if message is safe according to the selected policy"""
|
| 383 |
policy = content_policies[policy_name]
|
|
@@ -453,6 +444,14 @@ def run_action(message, history, game_state):
|
|
| 453 |
if(message == 'start game'):
|
| 454 |
return game_state['start']
|
| 455 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
world_info = f"""
|
| 457 |
World: {game_state['world']}
|
| 458 |
Kingdom: {game_state['kingdom']}
|
|
|
|
| 369 |
}
|
| 370 |
}
|
| 371 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 372 |
def is_safe(message, policy_name="Safe"):
|
| 373 |
"""Check if message is safe according to the selected policy"""
|
| 374 |
policy = content_policies[policy_name]
|
|
|
|
| 444 |
if(message == 'start game'):
|
| 445 |
return game_state['start']
|
| 446 |
|
| 447 |
+
system_prompt = """You are an AI Game master. Your job is to write what \
|
| 448 |
+
happens next in a player's adventure game.\
|
| 449 |
+
Instructions: \
|
| 450 |
+
You must on only write 1-3 sentences in response. \
|
| 451 |
+
Always write in second person present tense. \
|
| 452 |
+
Ex. (You look north and see...) \
|
| 453 |
+
Don't let the player use items they don't have in their inventory.
|
| 454 |
+
"""
|
| 455 |
world_info = f"""
|
| 456 |
World: {game_state['world']}
|
| 457 |
Kingdom: {game_state['kingdom']}
|