Update multi_agent.py
Browse files- multi_agent.py +8 -8
multi_agent.py
CHANGED
@@ -71,8 +71,8 @@ class ChessGame:
|
|
71 |
player_white = ConversableAgent(
|
72 |
name="Player White",
|
73 |
system_message="You are a chess Grandmaster and you play as white. "
|
74 |
-
"First, call
|
75 |
-
"If there is a legal move, then call
|
76 |
"If there is a legal move, lastly analyze the move in 3 bullet points (format **Analysis:** move in UCI format, unordered list)",
|
77 |
llm_config=llm_config_white,
|
78 |
)
|
@@ -80,26 +80,26 @@ class ChessGame:
|
|
80 |
player_black = ConversableAgent(
|
81 |
name="Player Black",
|
82 |
system_message="You are a chess Grandmaster and you play as black. "
|
83 |
-
"First, call
|
84 |
-
"If there is a legal move, then call
|
85 |
"If there is a legal move, lastly analyze the move in 3 bullet points (format **Analysis:** move in UCI format, unordered list).",
|
86 |
llm_config=llm_config_black,
|
87 |
)
|
88 |
|
89 |
for caller in [player_white, player_black]:
|
90 |
register_function(
|
91 |
-
|
92 |
caller=caller,
|
93 |
executor=board_proxy,
|
94 |
-
name="
|
95 |
description="Call this tool to get legal moves.",
|
96 |
)
|
97 |
|
98 |
register_function(
|
99 |
-
|
100 |
caller=caller,
|
101 |
executor=board_proxy,
|
102 |
-
name="
|
103 |
description="Call this tool to make a move.",
|
104 |
)
|
105 |
|
|
|
71 |
player_white = ConversableAgent(
|
72 |
name="Player White",
|
73 |
system_message="You are a chess Grandmaster and you play as white. "
|
74 |
+
"First, call get_legal_moves() to get a list of legal moves. "
|
75 |
+
"If there is a legal move, then call make_move(move) to make a move. "
|
76 |
"If there is a legal move, lastly analyze the move in 3 bullet points (format **Analysis:** move in UCI format, unordered list)",
|
77 |
llm_config=llm_config_white,
|
78 |
)
|
|
|
80 |
player_black = ConversableAgent(
|
81 |
name="Player Black",
|
82 |
system_message="You are a chess Grandmaster and you play as black. "
|
83 |
+
"First, call get_legal_moves() to get a list of legal moves. "
|
84 |
+
"If there is a legal move, then call make_move(move) to make a move. "
|
85 |
"If there is a legal move, lastly analyze the move in 3 bullet points (format **Analysis:** move in UCI format, unordered list).",
|
86 |
llm_config=llm_config_black,
|
87 |
)
|
88 |
|
89 |
for caller in [player_white, player_black]:
|
90 |
register_function(
|
91 |
+
get_legal_moves,
|
92 |
caller=caller,
|
93 |
executor=board_proxy,
|
94 |
+
name="get_legal_moves",
|
95 |
description="Call this tool to get legal moves.",
|
96 |
)
|
97 |
|
98 |
register_function(
|
99 |
+
make_move,
|
100 |
caller=caller,
|
101 |
executor=board_proxy,
|
102 |
+
name="make_move",
|
103 |
description="Call this tool to make a move.",
|
104 |
)
|
105 |
|