A programming framework for agentic AI
Update docs in RetrieveChat notebook and Installation (#379)
Li Jiangf9acb69aeabe
diff --git a/notebook/agentchat_RetrieveChat.ipynb b/notebook/agentchat_RetrieveChat.ipynbindex bfdb43b9d..36605e521 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",")"]diff --git a/website/docs/Installation.md b/website/docs/Installation.mdindex 5b75b9229..193e13839 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:```bashpython3 -m venv autogensource 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