-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change max_turn_num to max_consecutive_auto_reply
- Loading branch information
1 parent
87116ec
commit 3b3dd60
Showing
3 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ def test_extract_code(): | |
print(extract_code("```bash\npython temp.py\n```")) | ||
|
||
|
||
def test_coding_agent(human_input_mode="NEVER", max_turn_num=10): | ||
def test_coding_agent(human_input_mode="NEVER", max_consecutive_auto_reply=10): | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
qingyun-wu
Author
Contributor
|
||
try: | ||
import openai | ||
except ImportError: | ||
|
@@ -20,7 +20,7 @@ def test_coding_agent(human_input_mode="NEVER", max_turn_num=10): | |
user = HumanProxyAgent( | ||
"user", | ||
human_input_mode=human_input_mode, | ||
max_turn_num=max_turn_num, | ||
max_consecutive_auto_reply=max_consecutive_auto_reply, | ||
is_termination_msg=lambda x: x.rstrip().endswith("TERMINATE"), | ||
) | ||
# agent.receive("""Find $a+b+c$, given that $x+y\\neq -1$ and \\begin{align*} | ||
|
@@ -52,7 +52,7 @@ def test_coding_agent(human_input_mode="NEVER", max_turn_num=10): | |
oai.ChatCompletion.stop_logging() | ||
|
||
|
||
def test_tsp(human_input_mode="NEVER", max_turn_num=10): | ||
def test_tsp(human_input_mode="NEVER", max_consecutive_auto_reply=10): | ||
try: | ||
import openai | ||
except ImportError: | ||
|
@@ -69,7 +69,10 @@ def test_tsp(human_input_mode="NEVER", max_turn_num=10): | |
oai.ChatCompletion.start_logging() | ||
agent = PythonAgent("coding_agent", temperature=0) | ||
user = HumanProxyAgent( | ||
"user", work_dir="test/autogen", human_input_mode=human_input_mode, max_turn_num=max_turn_num | ||
"user", | ||
work_dir="test/autogen", | ||
human_input_mode=human_input_mode, | ||
max_consecutive_auto_reply=max_consecutive_auto_reply, | ||
) | ||
with open("test/autogen/tsp_prompt.txt", "r") as f: | ||
prompt = f.read() | ||
|
@@ -91,4 +94,4 @@ def test_tsp(human_input_mode="NEVER", max_turn_num=10): | |
# openai.api_key = "<your_api_key>" | ||
# test_extract_code() | ||
test_coding_agent(human_input_mode="TERMINATE") | ||
test_tsp(human_input_mode="NEVER", max_turn_num=2) | ||
test_tsp(human_input_mode="NEVER", max_consecutive_auto_reply=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some observations: