Update multi_agent.py
Browse files- multi_agent.py +14 -7
multi_agent.py
CHANGED
@@ -130,15 +130,22 @@ def run_multi_agent(llm_white, llm_black, num_moves):
|
|
130 |
}
|
131 |
],
|
132 |
)
|
|
|
|
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
140 |
|
141 |
-
|
|
|
|
|
|
|
|
|
142 |
|
143 |
result = ""
|
144 |
num_move = 0
|
|
|
130 |
}
|
131 |
],
|
132 |
)
|
133 |
+
|
134 |
+
chat_history = []
|
135 |
|
136 |
+
try:
|
137 |
+
chat_result = player_black.initiate_chat(
|
138 |
+
player_white,
|
139 |
+
message="Let's play chess!",
|
140 |
+
max_turns=get_num_turns(num_moves),
|
141 |
+
verbose=True
|
142 |
+
)
|
143 |
|
144 |
+
chat_history = chat_result.chat_history
|
145 |
+
except Exception as e:
|
146 |
+
print("###")
|
147 |
+
print(e)
|
148 |
+
print("###")
|
149 |
|
150 |
result = ""
|
151 |
num_move = 0
|