Update app.py
Browse files
app.py
CHANGED
|
@@ -134,7 +134,7 @@ def call_llm_for_order(role: str, local_state: dict, info_sharing_visible: bool,
|
|
| 134 |
# build prompt (concise)
|
| 135 |
prompt = (
|
| 136 |
f"You are the {role.title()} in a 4-player Beer Game (Retailer -> Wholesaler -> Distributor -> Factory).\n"
|
| 137 |
-
f"Week: {local_state.get('week')}\n"
|
| 138 |
f"- Inventory: {inventory}\n"
|
| 139 |
f"- Backlog: {backlog}\n"
|
| 140 |
f"- Incoming shipment next week: {pipeline_next}\n"
|
|
@@ -207,6 +207,7 @@ def state_snapshot_for_prompt(state: dict):
|
|
| 207 |
# safe snapshot (keys lowercase)
|
| 208 |
return {
|
| 209 |
"week": state.get("week"),
|
|
|
|
| 210 |
"inventory": state.get("inventory", {}).copy(),
|
| 211 |
"backlog": state.get("backlog", {}).copy(),
|
| 212 |
"incoming_orders": state.get("incoming_orders", {}).copy(),
|
|
|
|
| 134 |
# build prompt (concise)
|
| 135 |
prompt = (
|
| 136 |
f"You are the {role.title()} in a 4-player Beer Game (Retailer -> Wholesaler -> Distributor -> Factory).\n"
|
| 137 |
+
f"Week: {local_state.get('week')} / {local_state.get('weeks_total')}\n"
|
| 138 |
f"- Inventory: {inventory}\n"
|
| 139 |
f"- Backlog: {backlog}\n"
|
| 140 |
f"- Incoming shipment next week: {pipeline_next}\n"
|
|
|
|
| 207 |
# safe snapshot (keys lowercase)
|
| 208 |
return {
|
| 209 |
"week": state.get("week"),
|
| 210 |
+
"weeks_total": state.get("weeks_total"),
|
| 211 |
"inventory": state.get("inventory", {}).copy(),
|
| 212 |
"backlog": state.get("backlog", {}).copy(),
|
| 213 |
"incoming_orders": state.get("incoming_orders", {}).copy(),
|