Update docs in RetrieveChat notebook and Installation (#379)

* Update comments to make it more clear

* Update Installation
This commit is contained in:
Li Jiang
2023-10-24 06:28:38 +08:00
committed by GitHub
parent 6438625063
commit f9acb69aea
2 changed files with 13 additions and 3 deletions

View File

@@ -194,8 +194,13 @@
"\n",
"# 2. create the RetrieveUserProxyAgent instance named \"ragproxyagent\"\n",
"# By default, the human_input_mode is \"ALWAYS\", which means the agent will ask for human input at every step. We set it to \"NEVER\" here.\n",
"# `docs_path` is the path to the docs directory. By default, it is set to \"./docs\". Here we generated the documentations from FLAML's docstrings.\n",
"# Navigate to the website folder and run `pydoc-markdown` and it will generate folder `reference` under `website/docs`.\n",
"# `docs_path` is the path to the docs directory. It can also be the path to a single file, or the url to a single file. By default, \n",
"# it is set to None, which works only if the collection is already created.\n",
"# \n",
"# Here we generated the documentations from FLAML's docstrings. Not needed if you just want to try this notebook but not to reproduce the\n",
"# outputs. Clone the FLAML (https://github.com/microsoft/FLAML) repo and navigate to its website folder. Pip install and run `pydoc-markdown`\n",
"# and it will generate folder `reference` under `website/docs`.\n",
"#\n",
"# `task` indicates the kind of task we're working on. In this example, it's a `code` task.\n",
"# `chunk_token_size` is the chunk token size for the retrieve chat. By default, it is set to `max_tokens * 0.6`, here we set it to 2000.\n",
"ragproxyagent = RetrieveUserProxyAgent(\n",
@@ -204,11 +209,12 @@
" max_consecutive_auto_reply=10,\n",
" retrieve_config={\n",
" \"task\": \"code\",\n",
" \"docs_path\": \"../website/docs/reference\",\n",
" \"docs_path\": \"~/code/FLAML/website/docs/reference\", # change this to your own path, such as https://raw.githubusercontent.com/microsoft/autogen/main/README.md\n",
" \"chunk_token_size\": 2000,\n",
" \"model\": config_list[0][\"model\"],\n",
" \"client\": chromadb.PersistentClient(path=\"/tmp/chromadb\"),\n",
" \"embedding_model\": \"all-mpnet-base-v2\",\n",
" \"get_or_create\": False, # set to True if you want to recreate the collection\n",
" },\n",
")"
]

View File

@@ -4,12 +4,16 @@
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.
### Option 1: venv
You can create a virtual environment with `venv` as below:
```bash
python3 -m venv autogen
source autogen/bin/activate
```
### Option 2: conda
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