From c58ab720d37b7e527d77a5324d17723c07e51a7e Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Mon, 23 Oct 2023 20:11:02 +0800 Subject: [PATCH 1/2] Update comments to make it more clear --- notebook/agentchat_RetrieveChat.ipynb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/notebook/agentchat_RetrieveChat.ipynb b/notebook/agentchat_RetrieveChat.ipynb index bfdb43b9d509..36605e521605 100644 --- a/notebook/agentchat_RetrieveChat.ipynb +++ b/notebook/agentchat_RetrieveChat.ipynb @@ -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", ")" ] From 3bb75f71e6af8c0590ebf342c738f9d90ecd99db Mon Sep 17 00:00:00 2001 From: Li Jiang Date: Mon, 23 Oct 2023 20:13:38 +0800 Subject: [PATCH 2/2] Update Installation --- website/docs/Installation.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/docs/Installation.md b/website/docs/Installation.md index 9d064d4abb73..cb6a24385031 100644 --- a/website/docs/Installation.md +++ b/website/docs/Installation.md @@ -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