Update multi_agent.py
Browse files- 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 |
-
|
| 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":
|
| 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: {
|
| 148 |
),
|
| 149 |
]
|
| 150 |
-
).partial(options=str(
|
| 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
|