|
194 | 194 | "\n",
|
195 | 195 | "# 2. create the RetrieveUserProxyAgent instance named \"ragproxyagent\"\n",
|
196 | 196 | "# 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",
|
197 |
| - "# `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", |
198 |
| - "# Navigate to the website folder and run `pydoc-markdown` and it will generate folder `reference` under `website/docs`.\n", |
| 197 | + "# `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", |
| 198 | + "# it is set to None, which works only if the collection is already created.\n", |
| 199 | + "# \n", |
| 200 | + "# 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", |
| 201 | + "# outputs. Clone the FLAML (https://github.com/microsoft/FLAML) repo and navigate to its website folder. Pip install and run `pydoc-markdown`\n", |
| 202 | + "# and it will generate folder `reference` under `website/docs`.\n", |
| 203 | + "#\n", |
199 | 204 | "# `task` indicates the kind of task we're working on. In this example, it's a `code` task.\n",
|
200 | 205 | "# `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",
|
201 | 206 | "ragproxyagent = RetrieveUserProxyAgent(\n",
|
|
204 | 209 | " max_consecutive_auto_reply=10,\n",
|
205 | 210 | " retrieve_config={\n",
|
206 | 211 | " \"task\": \"code\",\n",
|
207 |
| - " \"docs_path\": \"../website/docs/reference\",\n", |
| 212 | + " \"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", |
208 | 213 | " \"chunk_token_size\": 2000,\n",
|
209 | 214 | " \"model\": config_list[0][\"model\"],\n",
|
210 | 215 | " \"client\": chromadb.PersistentClient(path=\"/tmp/chromadb\"),\n",
|
211 | 216 | " \"embedding_model\": \"all-mpnet-base-v2\",\n",
|
| 217 | + " \"get_or_create\": False, # set to True if you want to recreate the collection\n", |
212 | 218 | " },\n",
|
213 | 219 | ")"
|
214 | 220 | ]
|
|
0 commit comments