bstraehle commited on
Commit
65207b1
·
verified ·
1 Parent(s): 8abe45e

Update multi_agent.py

Browse files
Files changed (1) hide show
  1. multi_agent.py +5 -5
multi_agent.py CHANGED
@@ -116,8 +116,8 @@ def create_graph():
116
  "then the players take turns."
117
  )
118
 
119
- players = ["player_white", "player_black"]
120
-
121
  function_def = {
122
  "name": "route",
123
  "description": "Select the next player.",
@@ -128,7 +128,7 @@ def create_graph():
128
  "next": {
129
  "title": "Next",
130
  "anyOf": [
131
- {"enum": players},
132
  ],
133
  }
134
  },
@@ -144,10 +144,10 @@ def create_graph():
144
  "system",
145
  "If player_white made a move, player_black must make the next move. "
146
  "If player_black made a move, player_white must make the next move. "
147
- "Select one of: {players}.",
148
  ),
149
  ]
150
- ).partial(options=str(players), members=", ".join(players), verbose=True)
151
 
152
  supervisor_chain = (
153
  prompt
 
116
  "then the players take turns."
117
  )
118
 
119
+ options = ["player_white", "player_black"]
120
+
121
  function_def = {
122
  "name": "route",
123
  "description": "Select the next player.",
 
128
  "next": {
129
  "title": "Next",
130
  "anyOf": [
131
+ {"enum": options},
132
  ],
133
  }
134
  },
 
144
  "system",
145
  "If player_white made a move, player_black must make the next move. "
146
  "If player_black made a move, player_white must make the next move. "
147
+ "Select one of: {options}.",
148
  ),
149
  ]
150
+ ).partial(options=str(options), members=", ".join(options), verbose=True)
151
 
152
  supervisor_chain = (
153
  prompt