Skip to content

A programming framework for agentic AI

Update docs (#297)

Li Jiang749757aca334
diff --git a/autogen/agentchat/contrib/retrieve_user_proxy_agent.py b/autogen/agentchat/contrib/retrieve_user_proxy_agent.py
index 94677244a..40a146e93 100644
--- a/autogen/agentchat/contrib/retrieve_user_proxy_agent.py
+++ b/autogen/agentchat/contrib/retrieve_user_proxy_agent.py
@@ -1,5 +1,9 @@
import re
-import chromadb
+
+try:
+ import chromadb
+except ImportError:
+ raise ImportError("Please install dependencies first. `pip install pyautogen[retrievechat]`")
from autogen.agentchat.agent import Agent
from autogen.agentchat import UserProxyAgent
from autogen.retrieve_utils import create_vector_db_from_dir, query_vector_db, num_tokens_from_text
diff --git a/website/blog/2023-10-18-RetrieveChat/index.mdx b/website/blog/2023-10-18-RetrieveChat/index.mdx
index c917c7ef0..74c03d660 100644
--- a/website/blog/2023-10-18-RetrieveChat/index.mdx
+++ b/website/blog/2023-10-18-RetrieveChat/index.mdx
@@ -47,6 +47,12 @@ an answer, it replies with “Update Context” again. This process can be repea
The conversation terminates if no more documents are available for the context.
## Basic Usage of RAG Agents
+0. Install dependencies
+Please install pyautogen with the [retrievechat] option before using RAG agents.
+```bash
+pip install "pyautogen[retrievechat]"
+```
+
1. Import Agents
```python
from autogen
diff --git a/website/docs/Installation.md b/website/docs/Installation.md
index 9860c83b1..ede82dc53 100644
--- a/website/docs/Installation.md
+++ b/website/docs/Installation.md
@@ -4,11 +4,21 @@
When not using a docker container, we recommend using a virtual environment to install AutoGen. This will ensure that the dependencies for AutoGen are isolated from the rest of your system.
+You can create a virtual environment with `venv` as below:
```bash
python3 -m venv autogen
source autogen/bin/activate
```
+Another option is with `Conda`, Conda works better at solving dependency conflicts than pip. You can install it by following [this doc](https://docs.conda.io/projects/conda/en/stable/user-guide/install/index.html),
+and then create a virtual environment as below:
+```bash
+conda create -n autogen python=3.10 # python 3.10 is recommended as it's stable and not too old
+conda activate autogen
+```
+
+Now, you're ready to install AutoGen in the virtual environment you've just created.
+
## Python
AutoGen requires **Python version >= 3.8**. It can be installed from pip:
@@ -33,11 +43,19 @@ pip install docker
```
* blendsearch
+AutoGen offers a cost-effective hyperparameter optimization technique [EcoOptiGen](https://arxiv.org/abs/2303.04673) for tuning Large Language Models. Please install with the [blendsearch] option to use it.
```bash
pip install "pyautogen[blendsearch]"
```
* 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.
```bash
pip install "pyautogen[retrievechat]"
```
+
+* mathchat
+AutoGen offers an experimental agent for math problem solving. Please install with the [mathchat] option to use it.
+```bash
+pip install "pyautogen[mathchat]"
+```