Skip to content

Commit 9dd2e87

Browse files
authored
Merge branch 'main' into gagb-patch-1
2 parents 37a1dc7 + 749757a commit 9dd2e87

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

autogen/agentchat/contrib/retrieve_user_proxy_agent.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import re
2-
import chromadb
2+
3+
try:
4+
import chromadb
5+
except ImportError:
6+
raise ImportError("Please install dependencies first. `pip install pyautogen[retrievechat]`")
37
from autogen.agentchat.agent import Agent
48
from autogen.agentchat import UserProxyAgent
59
from autogen.retrieve_utils import create_vector_db_from_dir, query_vector_db, num_tokens_from_text

website/blog/2023-10-18-RetrieveChat/index.mdx

+6
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@ an answer, it replies with “Update Context” again. This process can be repea
4747
The conversation terminates if no more documents are available for the context.
4848

4949
## Basic Usage of RAG Agents
50+
0. Install dependencies
51+
Please install pyautogen with the [retrievechat] option before using RAG agents.
52+
```bash
53+
pip install "pyautogen[retrievechat]"
54+
```
55+
5056
1. Import Agents
5157
```python
5258
from autogen

website/docs/Installation.md

+18
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,21 @@
44

55
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.
66

7+
You can create a virtual environment with `venv` as below:
78
```bash
89
python3 -m venv autogen
910
source autogen/bin/activate
1011
```
1112

13+
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),
14+
and then create a virtual environment as below:
15+
```bash
16+
conda create -n autogen python=3.10 # python 3.10 is recommended as it's stable and not too old
17+
conda activate autogen
18+
```
19+
20+
Now, you're ready to install AutoGen in the virtual environment you've just created.
21+
1222
## Python
1323

1424
AutoGen requires **Python version >= 3.8**. It can be installed from pip:
@@ -33,11 +43,19 @@ pip install docker
3343
```
3444

3545
* blendsearch
46+
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.
3647
```bash
3748
pip install "pyautogen[blendsearch]"
3849
```
3950

4051
* retrievechat
52+
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.
4153
```bash
4254
pip install "pyautogen[retrievechat]"
4355
```
56+
57+
* mathchat
58+
AutoGen offers an experimental agent for math problem solving. Please install with the [mathchat] option to use it.
59+
```bash
60+
pip install "pyautogen[mathchat]"
61+
```

0 commit comments

Comments
 (0)