Setting up LLM Keys
If you are contributing to the AG2 project, you will need an LLM key depending on the submodule you are working on.- Using OAI_CONFIG_LIST
- Using LLM keys directly
AG2 uses an environment variable called Further, this
OAI_CONFIG_LIST in JSON format to store the LLM keys. OAI_CONFIG_LIST is a list of dictionaries where each dictionary contains the following keys:model(required): The name of the OpenAI/LLM model.api_key(optional): The API key for the OpenAI/LLM model.api_type(optional): The type of the API key. It is used for non-OpenAI LLMs.api_version(optional): The version of the API key. It is used for Azure API.base_url(optional): The base URL for the OpenAI/LLM model.tags(optional): A list of tags for the OpenAI/LLM model which can be used for filtering.
OAI_CONFIG_LIST in JSON format which consists of two OpenAI models and a gemini model:OAI_CONFIG_LIST can be set in two ways:- As environment variable
- As file
Simply set the
OAI_CONFIG_LIST environment variable in your terminal:Setting up the Development Environment
To contribute to the AG2 project, AG2 provides three different methods to set up the development environment:- Dev Containers
- Codespaces
- Virtual Environment
- Setup the necessary LLM keys as mentioned above in your terminal.
- Clone the AG2 repository and cd into the repository.
- Open the project in Visual Studio Code by running the following command from the root of the repository:
- Press
Ctrl+Shift+Pand selectDev Containers: Reopen in Container. - Select the desired python environment and wait for the container to build.
- Once the container is built, you can start developing AG2.