Skip to content

Commit 62c8a3e

Browse files
authored
doc and test update (microsoft#1053)
* doc and test update * docker update
1 parent 122d218 commit 62c8a3e

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RUN apt-get update \
1717
&& rm -rf /var/lib/apt/lists/*
1818
ENV DEBIAN_FRONTEND=dialog
1919

20-
RUN pip3 --disable-pip-version-check --no-cache-dir install flaml
20+
# RUN pip3 --disable-pip-version-check --no-cache-dir install flaml
2121
# For docs
2222
RUN npm install --global yarn
2323
RUN pip install pydoc-markdown==4.5.0

.devcontainer/devcontainer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
},
1010
"terminal.integrated.defaultProfile.linux": "bash"
1111
},
12-
"updateContentCommand": "pip install -e .[test,notebook] && pre-commit install"
13-
}
12+
"updateContentCommand": "pip install -e .[test,notebook,openai] && pre-commit install"
13+
}

flaml/autogen/agent/chat_agent.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,15 @@
44

55

66
class ChatAgent(Agent):
7-
"""(Experimental) Chat."""
8-
97
DEFAULT_SYSTEM_MESSAGE = """You are a chat agent.
108
"""
119

1210
DEFAULT_CONFIG = {
1311
"model": DEFAULT_MODEL,
1412
}
1513

16-
def __init__(self, name, system_message=DEFAULT_SYSTEM_MESSAGE, work_dir=None, **config):
17-
"""
18-
Args:
19-
name (str): agent name
20-
system_message (str): system message to be sent to the agent
21-
work_dir (str): working directory for the agent to execute code
22-
config (dict): other configurations.
23-
"""
14+
def __init__(self, name, system_message=DEFAULT_SYSTEM_MESSAGE, **config):
2415
super().__init__(name, system_message)
25-
self._work_dir = work_dir
2616
self._config = self.DEFAULT_CONFIG.copy()
2717
self._config.update(config)
2818
self._sender_dict = {}

flaml/autogen/agent/user_proxy_agent.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def __init__(
2424
name (str): name of the agent
2525
system_message (str): system message to be sent to the agent
2626
work_dir (str): working directory for the agent
27-
human_input_mode (bool): whether to ask for human inputs every time a message is received.
27+
human_input_mode (str): whether to ask for human inputs every time a message is received.
2828
Possible values are "ALWAYS", "TERMINATE", "NEVER".
2929
(1) When "ALWAYS", the agent prompts for human input every time a message is received.
3030
Under this mode, the conversation stops when the human input is "exit",
@@ -34,12 +34,12 @@ def __init__(
3434
(3) When "NEVER", the agent will never prompt for human input. Under this mode, the conversation stops
3535
when the number of auto reply reaches the max_consecutive_auto_reply or or when is_termination_msg is True.
3636
max_consecutive_auto_reply (int): the maximum number of consecutive auto replies.
37-
default: None (no limit provided, class attribute MAX_CONSECUTIVE_AUTO_REPLY will be used as the limit in this case).
37+
default to None (no limit provided, class attribute MAX_CONSECUTIVE_AUTO_REPLY will be used as the limit in this case).
3838
The limit only plays a role when human_input_mode is not "ALWAYS".
3939
is_termination_msg (function): a function that takes a message and returns a boolean value.
4040
This function is used to determine if a received message is a termination message.
41-
config (dict): other configurations.
42-
41+
use_docker (bool): whether to use docker to execute the code.
42+
**config (dict): other configurations.
4343
"""
4444
super().__init__(name, system_message)
4545
self._work_dir = work_dir

test/autogen/test_user_proxy_agent.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
KEY_LOC = "test/autogen"
44

55

6-
def test_human_agent():
6+
def test_user_proxy_agent():
77
try:
88
import openai
99
except ImportError:
@@ -29,4 +29,4 @@ def test_human_agent():
2929

3030

3131
if __name__ == "__main__":
32-
test_human_agent()
32+
test_user_proxy_agent()

0 commit comments

Comments
 (0)