Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Fix type and default value of the code_execution_config parameter in UserProxyAgent #1995

Closed
davorrunje opened this issue Mar 13, 2024 · 0 comments · Fixed by #1996
Assignees

Comments

@davorrunje
Copy link
Collaborator

Describe the issue

UserProxyAgent declares code_execution_config to be an optional parameter and sets its default value for to None

code_execution_config: Optional[Union[Dict, Literal[False]]] = None,
, while ConversableAgent deprecated use of None
code_execution_config: Union[Dict, Literal[False]] = False,

Steps to reproduce

Instantiating a user proxy results in a deprecating warning. E.g. by running the following test:

pytest test/agentchat/test_agent_setup_with_use_docker_settings.py -k test_agent_setup_with_env_variable_false_and_docker_running

we get the following warning

============================================== warnings summary ===============================================
test/agentchat/test_agent_setup_with_use_docker_settings.py::test_agent_setup_with_env_variable_false_and_docker_running
  /workspaces/autogen/autogen/agentchat/user_proxy_agent.py:83: UserWarning: Using None to signal a default code_execution_config is deprecated. Use {} to use default or False to disable code execution.
    super().__init__(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html```

### Screenshots and logs

_No response_

### Additional Information

_No response_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant