* Used absolute path of virtual environment bin path in local command executors
* Checked if the expected venv is used or not
* Added code comments for documentation
* fix: format issue - shutil lib
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Li Jiang <bnujli@gmail.com>
* Add ability to use virtual environments in local executor
* Copy environment variables from parent environment
* Fix mypy errors and formatting
* Account for venv on Windows
* Use a virtual environment context object instead of path
* Add utility method to create a virtual environment
* Remove assertion using `_venv_path`
* Add tests for `create_virtual_env`
* Modify test code and add output assertion
* Modify test code and assertion
* Execute activation script before actual command on windows
* Add docs for using a virtual env
* Add support for HTML, CSS and Javascript in LocalCommandLineCodeExecutor
* init branch
* init branch
* feat: test code execution added
* fix: test update
* fix: test
* fix: policy test
* feat: default policy
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Add "py" as lang in conversable agent (#1062)
* Add conditions to allow for python executable variants (#1062)
* reverted import (#1062)
* Parameterized tests, moved Python variants to a constant (#1062)
* Moved Python variants to a constant (#1062)
* Update autogen/code_utils.py (#1062)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Update autogen/coding/local_commandline_code_executor.py (#1062)
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Added PYTHON_VARIANTS as imported constant (#1062)
* ran pre-commit-check (#1062)
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Add isort
* Apply isort on py files
* Fix circular import
* Fix format for notebooks
* Fix format
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Implement user defined functions feature for local cli exec, add docs
* add tests, update docs
* fixes
* fix test
* add pandas test dep
* install test
* provide template as func
* formatting
* undo change
* address comments
* add test deps
* formatting
* test only in 1 env
* formatting
* remove test for local only
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* consistent file saving across cli executors
* test fixes
* feedback
* make path
* formatting
* run timeout test on windows
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Remove system message functionality from code executors
* remove from protocol
* fix tests, pre-commit
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* Change name from LocalCommandlineCodeExecutor to LocalCommandLineCodeExecutor
* formatting
* name
* name
* CommandLineCodeResult rename too
* formatting
* checkpoint async based
* Implement jupyter client and use jupyer gateway
* update deps
* address comments
* add missing parenthesis
* Update build.yml
* CI fixes
* change requirement name
* debug
* print stderr
* dont seek
* show token
* mitigaton for windows bug
* use hex token to avoid - in token
* formatting
* put back in place original while the windows bug exists
* lint
* Update autogen/coding/jupyter_code_executor.py
* Update jupyter_code_executor.py
* Update test_embedded_ipython_code_executor.py
* Update setup.py
* Update build.yml
* fix nameerror
---------
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* UPDATE - add commandline sanitation class, update local_commandline_code_executor.py and renamed test for code_utils.py
* FIX - precommit run
* UPDATE - moved sanitation function to LocalCommandlineCodeExecutor, moved testo to test_commandline_code_executor.py
* UPDATE - added docstring notice to sanitize_code
* Update autogen/coding/local_commandline_code_executor.py
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* FIX - regular expression
* FIX - function invocation in tests
* UPDATE - pre-commit run
* FIX - pre-commit run -_-
---------
Co-authored-by: Ward <award40@LAMU0CLP74YXVX6.uhc.com>
Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com>
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
* Add unit test coverage for the `is_valid_api_key` function.
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
*Add unit test coverage for the `is_valid_api_key` function.
* Log a warning when register a default client fails.
* Validate the OpenAI API key format
Increase the amount of internal validation for OpenAI API keys. The intent is
to shorten the debugging loop in case of typos. The changes do *not* add
validation for Azure OpenAI API keys.
* Add the validation in `__init__` of `OpenAIClient`. We'll log a
warning when the OpenAI API key isn't valid.
* Introduce the `MOCK_OPEN_AI_API_KEY` constant for testing.
* Add unit test coverage for the `is_valid_api_key` function.
* Check for OpenAI base_url before API key validation
---------
Co-authored-by: Chi Wang <wang.chi@microsoft.com>
* code executor
* test
* revert to main conversable agent
* prepare for pr
* kernel
* run open ai tests only when it's out of draft status
* update workflow file
* revert workflow changes
* ipython executor
* check kernel installed; fix tests
* fix tests
* fix tests
* update system prompt
* Update notebook, more tests
* notebook
* raise instead of return None
* allow user provided code executor.
* fixing types
* wip
* refactoring
* polishing
* fixed failing tests
* resolved merge conflict
* fixing failing test
* wip
* local command line executor and embedded ipython executor
* revert notebook
* fix format
* fix merged error
* fix lmm test
* fix lmm test
* move warning
* name and description should be part of the agent protocol, reset is not as it is only used for ConversableAgent; removing accidentally commited file
* version for dependency
* Update autogen/agentchat/conversable_agent.py
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
* ordering of protocol
* description
* fix tests
* make ipython executor dependency optional
* update document optional dependencies
* Remove exclude from Agent protocol
* Make ConversableAgent consistent with Agent
* fix tests
* add doc string
* add doc string
* fix notebook
* fix interface
* merge and update agents
* disable config usage in reply function
* description field setter
* customize system message update
* update doc
---------
Co-authored-by: Davor Runje <davor@airt.ai>
Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
Co-authored-by: Aaron <aaronlaptop12@hotmail.com>
Co-authored-by: Chi Wang <wang.chi@microsoft.com>