Skip to content

Commit

Permalink
Update docs in RetrieveChat notebook and Installation (microsoft#379)
Browse files Browse the repository at this point in the history
* Update comments to make it more clear

* Update Installation
  • Loading branch information
thinkall authored Oct 23, 2023
1 parent ed36f3f commit 275023b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 9 additions & 3 deletions notebook/agentchat_RetrieveChat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
")"
]
Expand Down
4 changes: 4 additions & 0 deletions website/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 275023b

Please sign in to comment.