Optional Dependencies
Different LLMs
AG2 installs OpenAI package by default. To use LLMs by other providers, you can install the following packages:
Check out the notebook and blogpost for more details.
LLM Caching
To use LLM caching with Redis, you need to install the Python package with
the option redis
:
See LLM Caching for details.
IPython Code Executor
To use the IPython code executor, you need to install the jupyter-client
and ipykernel
packages:
To use the IPython code executor:
blendsearch
pyautogen<0.2
offers a cost-effective hyperparameter optimization technique EcoOptiGen for tuning Large Language Models. Please install with the [blendsearch] option to use it.
Checkout Optimize for Code Generation and Optimize for Math for details.
retrievechat
autogen
supports retrieval-augmented generation tasks such as question answering and code generation with RAG agents. Please install with the [retrievechat] option to use it with ChromaDB.
Alternatively autogen
also supports PGVector and Qdrant which can be installed in place of ChromaDB, or alongside it.
RetrieveChat can handle various types of documents. By default, it can process
plain text and PDF files, including formats such as ‘txt’, ‘json’, ‘csv’, ‘tsv’,
‘md’, ‘html’, ‘htm’, ‘rtf’, ‘rst’, ‘jsonl’, ‘log’, ‘xml’, ‘yaml’, ‘yml’ and ‘pdf’.
If you install unstructured
(pip install "unstructured[all-docs]"
), additional document types such as ‘docx’,
‘doc’, ‘odt’, ‘pptx’, ‘ppt’, ‘xlsx’, ‘eml’, ‘msg’, ‘epub’ will also be supported.
You can find a list of all supported document types by using autogen.retrieve_utils.TEXT_FORMATS
.
Example notebooks:
Automated Code Generation and Question Answering with Retrieval Augmented Agents
Group Chat with Retrieval Augmented Generation (with 5 group member agents and 1 manager agent)
Automated Code Generation and Question Answering with Qdrant based Retrieval Augmented Agents
Teachability
To use Teachability, please install AG2 with the [teachable] option.
Example notebook: Chatting with a teachable agent
Large Multimodal Model (LMM) Agents
We offered Multimodal Conversable Agent and LLaVA Agent. Please install with the [lmm] option to use it.
Example notebook: LLaVA Agent
mathchat
pyautogen<0.2
offers an experimental agent for math problem solving. Please install with the [mathchat] option to use it.
Example notebook: Using MathChat to Solve Math Problems
Graph
To use a graph in GroupChat
, particularly for graph visualization, please install AutoGen with the [graph] option.
Example notebook: Finite State Machine graphs to set speaker transition constraints
Long Context Handling
AG2 includes support for handling long textual contexts by leveraging the LLMLingua library for text compression. To enable this functionality, please install AutoGen with the [long-context]
option: