mirror of
https://github.com/microsoft/autogen.git
synced 2026-04-20 03:02:16 -04:00
Refactor code executor namespace (#4538)
* refactor code exec namespaces * delete code exec init * update conflicts --------- Co-authored-by: Leonardo Pinheiro <lpinheiro@microsoft.com>
This commit is contained in:
committed by
GitHub
parent
c02d87e9cf
commit
4018a129f8
@@ -31,7 +31,7 @@ class CodeExecutorAgent(BaseChatAgent):
|
||||
Follow the installation instructions for `Docker <https://docs.docker.com/get-docker/>`_.
|
||||
|
||||
In this example, we show how to set up a `CodeExecutorAgent` agent that uses the
|
||||
:py:class:`~autogen_ext.code_executors.DockerCommandLineCodeExecutor`
|
||||
:py:class:`~autogen_ext.code_executors.docker.DockerCommandLineCodeExecutor`
|
||||
to execute code snippets in a Docker container. The `work_dir` parameter indicates where all executed files are first saved locally before being executed in the Docker container.
|
||||
|
||||
.. code-block:: python
|
||||
@@ -39,7 +39,7 @@ class CodeExecutorAgent(BaseChatAgent):
|
||||
import asyncio
|
||||
from autogen_agentchat.agents import CodeExecutorAgent
|
||||
from autogen_agentchat.messages import TextMessage
|
||||
from autogen_ext.code_executors import DockerCommandLineCodeExecutor
|
||||
from autogen_ext.code_executors.docker import DockerCommandLineCodeExecutor
|
||||
from autogen_core import CancellationToken
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user