AutoGen Basics
Steps
- Create a new project folder.
- Create a new virtual environment
python -m venv .venv
. - Activate the venv
source .venv/bin/activate
- Install packages with
pip install pyautogen
. - Create the OAI_CONFIG_LIST file.
- Go to https://platform.openai.com/account/api-keys to create the new OpenAI API key.
- Paste the generated API key and paste it in the OAI_CONFIG_LIST
- Create the basic.py file.
- Import AutoGen
- Create a config list
- Create the Assistant Agent
- Create the User Proxy Agent
- Initiate Chat.
- Build Docker image
docker build -t autogen-basic .
- Start new docker container with the new image
docker run -it --rm -v ./logs:/var/log -v ./generated-code:/app/generated-code -v ./OAI_CONFIG_LIST:/app/OAI_CONFIG_LIST autogen-basic