Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkall committed Oct 19, 2023
1 parent bed85a3 commit 37910da
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autogen/agentchat/contrib/retrieve_user_proxy_agent.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 6 additions & 0 deletions website/blog/2023-10-18-RetrieveChat/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions website/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]"
```

0 comments on commit 37910da

Please sign in to comment.