Spaces:
Runtime error
Runtime error
Commit
·
4cb767c
1
Parent(s):
c36551a
Update app.py
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ mistakes sometimes. In this game, you can choose either Option J or Option F to
|
|
| 45 |
elif player == 2:
|
| 46 |
previous_round = f"In round {round_num-1}, you chose Option {last_round[1]} and the other player chose Option {last_round[0]}. Thus, you won {PAYOFF[last_round][1]} points and the other player won {PAYOFF[last_round][0]} points."
|
| 47 |
|
| 48 |
-
prompt = f"{previous_round}\n\nYou are currently playing round {round_num}.\n\nQuestion: Based on the rules and the result of the previous round, which Option do you choose for this round, Option J or Option F ? Answer only \"J\" or \"F\"\n\nAnswer: "
|
| 49 |
|
| 50 |
#print(f"Below is the prompt for Player {player} and Round {round_num}:\n {prompt}")
|
| 51 |
|
|
@@ -53,7 +53,7 @@ mistakes sometimes. In this game, you can choose either Option J or Option F to
|
|
| 53 |
completion = openai.ChatCompletion.create(
|
| 54 |
model=model,
|
| 55 |
messages=[
|
| 56 |
-
{"role": "system", "content": f"{game_rules}\n\n{player_description}"
|
| 57 |
{"role": "user", "content": prompt}
|
| 58 |
],
|
| 59 |
temperature = 0,
|
|
|
|
| 45 |
elif player == 2:
|
| 46 |
previous_round = f"In round {round_num-1}, you chose Option {last_round[1]} and the other player chose Option {last_round[0]}. Thus, you won {PAYOFF[last_round][1]} points and the other player won {PAYOFF[last_round][0]} points."
|
| 47 |
|
| 48 |
+
prompt = f"{game_rules}\n\n{player_description}\n\n{previous_round}\n\nYou are currently playing round {round_num}.\n\nQuestion: Based on the rules and the result of the previous round, which Option do you choose for this round, Option J or Option F ? Answer only \"J\" or \"F\"\n\nAnswer: "
|
| 49 |
|
| 50 |
#print(f"Below is the prompt for Player {player} and Round {round_num}:\n {prompt}")
|
| 51 |
|
|
|
|
| 53 |
completion = openai.ChatCompletion.create(
|
| 54 |
model=model,
|
| 55 |
messages=[
|
| 56 |
+
{"role": "system", "content": "You are a self-interested intelligence."},#f"{game_rules}\n\n{player_description}"
|
| 57 |
{"role": "user", "content": prompt}
|
| 58 |
],
|
| 59 |
temperature = 0,
|