From 799a24e04f8e0471053c8ff78582403441849249 Mon Sep 17 00:00:00 2001 From: Jack Gerrits Date: Mon, 4 Mar 2024 13:02:26 -0500 Subject: [PATCH] Create topics dir and move llm config (#1853) * create topics dir and move llm config * fix redirect * fix link --- notebook/agentchat_RetrieveChat.ipynb | 8 +++++--- .../agentchat_auto_feedback_from_code_execution.ipynb | 2 +- notebook/agentchat_cost_token_tracking.ipynb | 2 +- notebook/agentchat_function_call.ipynb | 2 +- notebook/agentchat_function_call_async.ipynb | 2 +- .../agentchat_function_call_currency_calculator.ipynb | 2 +- notebook/agentchat_groupchat.ipynb | 2 +- notebook/agentchat_groupchat_RAG.ipynb | 2 +- notebook/agentchat_groupchat_research.ipynb | 2 +- notebook/agentchat_groupchat_vis.ipynb | 2 +- notebook/agentchat_human_feedback.ipynb | 2 +- notebook/agentchat_langchain.ipynb | 2 +- notebook/agentchat_multi_task_async_chats.ipynb | 2 +- notebook/agentchat_multi_task_chats.ipynb | 2 +- notebook/agentchat_nestedchat.ipynb | 2 +- notebook/agentchat_oai_assistant_groupchat.ipynb | 2 +- notebook/agentchat_society_of_mind.ipynb | 2 +- notebook/agentchat_stream.ipynb | 2 +- notebook/agentchat_two_users.ipynb | 2 +- notebook/agentchats_sequential_chats.ipynb | 2 +- notebook/config_loader_utility_functions.ipynb | 2 +- notebook/contributing.md | 2 +- website/.gitignore | 2 +- website/docs/Examples.md | 2 +- website/docs/FAQ.mdx | 6 +++--- website/docs/Use-Cases/enhanced_inference.md | 2 +- website/docs/{ => topics}/llm_configuration.ipynb | 2 +- website/docusaurus.config.js | 6 +++++- website/sidebars.js | 2 +- 29 files changed, 39 insertions(+), 33 deletions(-) rename website/docs/{ => topics}/llm_configuration.ipynb (98%) diff --git a/notebook/agentchat_RetrieveChat.ipynb b/notebook/agentchat_RetrieveChat.ipynb index 92620a55b331..ae8cecdf4367 100644 --- a/notebook/agentchat_RetrieveChat.ipynb +++ b/notebook/agentchat_RetrieveChat.ipynb @@ -86,7 +86,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````\n", "\n", @@ -3015,8 +3015,10 @@ ], "metadata": { "front_matter": { - "tags": ["RAG"], - "description": "Explore the use of AutoGen's RetrieveChat for tasks like code generation from docstrings, answering complex questions with human feedback, and exploiting features like Update Context, custom prompts, and few-shot learning." + "description": "Explore the use of AutoGen's RetrieveChat for tasks like code generation from docstrings, answering complex questions with human feedback, and exploiting features like Update Context, custom prompts, and few-shot learning.", + "tags": [ + "RAG" + ] }, "kernelspec": { "display_name": "Python 3 (ipykernel)", diff --git a/notebook/agentchat_auto_feedback_from_code_execution.ipynb b/notebook/agentchat_auto_feedback_from_code_execution.ipynb index 1598c66f8f0d..c269e7478723 100644 --- a/notebook/agentchat_auto_feedback_from_code_execution.ipynb +++ b/notebook/agentchat_auto_feedback_from_code_execution.ipynb @@ -55,7 +55,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````" ] diff --git a/notebook/agentchat_cost_token_tracking.ipynb b/notebook/agentchat_cost_token_tracking.ipynb index 05655b452009..491fa1b1e401 100644 --- a/notebook/agentchat_cost_token_tracking.ipynb +++ b/notebook/agentchat_cost_token_tracking.ipynb @@ -102,7 +102,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_function_call.ipynb b/notebook/agentchat_function_call.ipynb index 05cb0e58e0f4..1ae6dd81b744 100644 --- a/notebook/agentchat_function_call.ipynb +++ b/notebook/agentchat_function_call.ipynb @@ -103,7 +103,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_function_call_async.ipynb b/notebook/agentchat_function_call_async.ipynb index b3035725943e..a57eb916b613 100644 --- a/notebook/agentchat_function_call_async.ipynb +++ b/notebook/agentchat_function_call_async.ipynb @@ -55,7 +55,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````\n", "\n", diff --git a/notebook/agentchat_function_call_currency_calculator.ipynb b/notebook/agentchat_function_call_currency_calculator.ipynb index 0ff2beb97285..6709aec77629 100644 --- a/notebook/agentchat_function_call_currency_calculator.ipynb +++ b/notebook/agentchat_function_call_currency_calculator.ipynb @@ -106,7 +106,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_groupchat.ipynb b/notebook/agentchat_groupchat.ipynb index bb45ade83af4..d2c061d14105 100644 --- a/notebook/agentchat_groupchat.ipynb +++ b/notebook/agentchat_groupchat.ipynb @@ -57,7 +57,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````\n", "\n", diff --git a/notebook/agentchat_groupchat_RAG.ipynb b/notebook/agentchat_groupchat_RAG.ipynb index 50d35f5a9d82..c2140c42e196 100644 --- a/notebook/agentchat_groupchat_RAG.ipynb +++ b/notebook/agentchat_groupchat_RAG.ipynb @@ -66,7 +66,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````\n", "\n", diff --git a/notebook/agentchat_groupchat_research.ipynb b/notebook/agentchat_groupchat_research.ipynb index 8b569f8f5467..30ad696abb3a 100644 --- a/notebook/agentchat_groupchat_research.ipynb +++ b/notebook/agentchat_groupchat_research.ipynb @@ -93,7 +93,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_groupchat_vis.ipynb b/notebook/agentchat_groupchat_vis.ipynb index d46741d15e61..ac084bf34e56 100644 --- a/notebook/agentchat_groupchat_vis.ipynb +++ b/notebook/agentchat_groupchat_vis.ipynb @@ -110,7 +110,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](/docs/topics/llm_configuration) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_human_feedback.ipynb b/notebook/agentchat_human_feedback.ipynb index 41fbed5cd8eb..75078e67cf9c 100644 --- a/notebook/agentchat_human_feedback.ipynb +++ b/notebook/agentchat_human_feedback.ipynb @@ -102,7 +102,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_langchain.ipynb b/notebook/agentchat_langchain.ipynb index 12ffafff2755..83ab2df44c28 100644 --- a/notebook/agentchat_langchain.ipynb +++ b/notebook/agentchat_langchain.ipynb @@ -139,7 +139,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_multi_task_async_chats.ipynb b/notebook/agentchat_multi_task_async_chats.ipynb index bc7d35dabd3b..901624d80e35 100644 --- a/notebook/agentchat_multi_task_async_chats.ipynb +++ b/notebook/agentchat_multi_task_async_chats.ipynb @@ -43,7 +43,7 @@ "source": [ "\\:\\:\\:tip\n", "\n", - "Learn more about the various ways to configure LLM endpoints [here](/docs/llm_configuration).\n", + "Learn more about the various ways to configure LLM endpoints [here](/docs/topics/llm_configuration).\n", "\n", "\\:\\:\\:" ] diff --git a/notebook/agentchat_multi_task_chats.ipynb b/notebook/agentchat_multi_task_chats.ipynb index 3f10bb072bf8..e640e15ff6d2 100644 --- a/notebook/agentchat_multi_task_chats.ipynb +++ b/notebook/agentchat_multi_task_chats.ipynb @@ -43,7 +43,7 @@ "source": [ "\\:\\:\\:tip\n", "\n", - "Learn more about the various ways to configure LLM endpoints [here](/docs/llm_configuration).\n", + "Learn more about the various ways to configure LLM endpoints [here](/docs/topics/llm_configuration).\n", "\n", "\\:\\:\\:" ] diff --git a/notebook/agentchat_nestedchat.ipynb b/notebook/agentchat_nestedchat.ipynb index 03a8afa8d7c5..1e902a7f6213 100644 --- a/notebook/agentchat_nestedchat.ipynb +++ b/notebook/agentchat_nestedchat.ipynb @@ -43,7 +43,7 @@ "source": [ "\\:\\:\\:tip\n", "\n", - "Learn more about the various ways to configure LLM endpoints [here](/docs/llm_configuration).\n", + "Learn more about the various ways to configure LLM endpoints [here](/docs/topics/llm_configuration).\n", "\n", "\\:\\:\\:" ] diff --git a/notebook/agentchat_oai_assistant_groupchat.ipynb b/notebook/agentchat_oai_assistant_groupchat.ipynb index 4375af3f21f2..603d2cf71d99 100644 --- a/notebook/agentchat_oai_assistant_groupchat.ipynb +++ b/notebook/agentchat_oai_assistant_groupchat.ipynb @@ -62,7 +62,7 @@ "]\n", "```\n", "\n", - "Currently Azure OpenAI does not support assistant api. You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "Currently Azure OpenAI does not support assistant api. You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_society_of_mind.ipynb b/notebook/agentchat_society_of_mind.ipynb index be9ef55214ba..9a456ccdab92 100644 --- a/notebook/agentchat_society_of_mind.ipynb +++ b/notebook/agentchat_society_of_mind.ipynb @@ -51,7 +51,7 @@ "source": [ "````{=mdx}\n", ":::tip\n", - "Learn more about configuring LLMs for agents [here](/docs/llm_configuration).\n", + "Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration).\n", ":::\n", "````\n", "\n", diff --git a/notebook/agentchat_stream.ipynb b/notebook/agentchat_stream.ipynb index 7f671bc01660..8cb899d2b508 100644 --- a/notebook/agentchat_stream.ipynb +++ b/notebook/agentchat_stream.ipynb @@ -102,7 +102,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchat_two_users.ipynb b/notebook/agentchat_two_users.ipynb index a7ea0f72faca..217492786885 100644 --- a/notebook/agentchat_two_users.ipynb +++ b/notebook/agentchat_two_users.ipynb @@ -82,7 +82,7 @@ "]\n", "```\n", "\n", - "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/llm_configuration.ipynb) for full code examples of the different methods." + "You can set the value of config_list in any way you prefer. Please refer to this [notebook](https://github.com/microsoft/autogen/blob/main/website/docs/topics/llm_configuration.ipynb) for full code examples of the different methods." ] }, { diff --git a/notebook/agentchats_sequential_chats.ipynb b/notebook/agentchats_sequential_chats.ipynb index 9b590405068c..3f6eae5f1414 100644 --- a/notebook/agentchats_sequential_chats.ipynb +++ b/notebook/agentchats_sequential_chats.ipynb @@ -43,7 +43,7 @@ "source": [ "\\:\\:\\:tip\n", "\n", - "Learn more about the various ways to configure LLM endpoints [here](/docs/llm_configuration).\n", + "Learn more about the various ways to configure LLM endpoints [here](/docs/topics/llm_configuration).\n", "\n", "\\:\\:\\:" ] diff --git a/notebook/config_loader_utility_functions.ipynb b/notebook/config_loader_utility_functions.ipynb index 84de7cd48d5f..f14288c12099 100644 --- a/notebook/config_loader_utility_functions.ipynb +++ b/notebook/config_loader_utility_functions.ipynb @@ -6,7 +6,7 @@ "source": [ "# Config loader utility functions\n", "\n", - "For an introduction to configuring LLMs, refer to the [main configuration docs](https://microsoft.github.io/autogen/docs/llm_configuration). This guide will run through examples of the more advanced utility functions for managing API configurations.\n", + "For an introduction to configuring LLMs, refer to the [main configuration docs](https://microsoft.github.io/autogen/docs/topics/llm_configuration). This guide will run through examples of the more advanced utility functions for managing API configurations.\n", "\n", "Managing API configurations can be tricky, especially when dealing with multiple models and API versions. The provided utility functions assist users in managing these configurations effectively. Ensure your API keys and other sensitive data are stored securely. You might store keys in `.txt` or `.env` files or environment variables for local development. Never expose your API keys publicly. If you insist on storing your key files locally on your repo (you shouldn't), ensure the key file path is added to the `.gitignore` file.\n", "\n", diff --git a/notebook/contributing.md b/notebook/contributing.md index c717939b2424..fcafe3c71152 100644 --- a/notebook/contributing.md +++ b/notebook/contributing.md @@ -77,7 +77,7 @@ Then after the code cell where this is used, include the following markdown snip `````` ````{=mdx} :::tip -Learn more about configuring LLMs for agents [here](/docs/llm_configuration). +Learn more about configuring LLMs for agents [here](/docs/topics/llm_configuration). ::: ```` `````` diff --git a/website/.gitignore b/website/.gitignore index a83bf4912121..be132bdc8272 100644 --- a/website/.gitignore +++ b/website/.gitignore @@ -11,7 +11,7 @@ package-lock.json docs/reference /docs/notebooks -docs/llm_configuration.mdx +docs/topics/llm_configuration.mdx # Misc .DS_Store diff --git a/website/docs/Examples.md b/website/docs/Examples.md index 76c82b2418f2..383fe4ecb974 100644 --- a/website/docs/Examples.md +++ b/website/docs/Examples.md @@ -97,7 +97,7 @@ Links to notebook examples: ## Enhanced Inferences ### Utilities - API Unification - [View Documentation with Code Example](https://microsoft.github.io/autogen/docs/Use-Cases/enhanced_inference/#api-unification) -- Utility Functions to Help Managing API configurations effectively - [View Notebook](/docs/llm_configuration) +- Utility Functions to Help Managing API configurations effectively - [View Notebook](/docs/topics/llm_configuration) - Cost Calculation - [View Notebook](https://github.com/microsoft/autogen/blob/main/notebook/oai_client_cost.ipynb) ### Inference Hyperparameters Tuning diff --git a/website/docs/FAQ.mdx b/website/docs/FAQ.mdx index ee9266917173..fad5abfafb9e 100644 --- a/website/docs/FAQ.mdx +++ b/website/docs/FAQ.mdx @@ -15,15 +15,15 @@ Typical errors that you might face when using the wrong package are `AttributeEr ## Set your API endpoints -This documentation has been moved [here](/docs/llm_configuration). +This documentation has been moved [here](/docs/topics/llm_configuration). ### Use the constructed configuration list in agents -This documentation has been moved [here](/docs/llm_configuration). +This documentation has been moved [here](/docs/topics/llm_configuration). ### How does an agent decide which model to pick out of the list? -This documentation has been moved [here](/docs/llm_configuration#how-does-an-agent-decide-which-model-to-pick-out-of-the-list). +This documentation has been moved [here](/docs/topics/llm_configuration#how-does-an-agent-decide-which-model-to-pick-out-of-the-list). ### Unexpected keyword argument 'base_url' diff --git a/website/docs/Use-Cases/enhanced_inference.md b/website/docs/Use-Cases/enhanced_inference.md index ad94b9bc8ef6..5ff61c2585d1 100644 --- a/website/docs/Use-Cases/enhanced_inference.md +++ b/website/docs/Use-Cases/enhanced_inference.md @@ -279,7 +279,7 @@ For convenience, we provide a number of utility functions to load config lists. - `config_list_from_models`: Creates configurations based on a provided list of models, useful when targeting specific models without manually specifying each configuration. - `config_list_from_dotenv`: Constructs a configuration list from a `.env` file, offering a consolidated way to manage multiple API configurations and keys from a single file. -We suggest that you take a look at this [notebook](/docs/llm_configuration) for full code examples of the different methods to configure your model endpoints. +We suggest that you take a look at this [notebook](/docs/topics/llm_configuration) for full code examples of the different methods to configure your model endpoints. ### Logic error diff --git a/website/docs/llm_configuration.ipynb b/website/docs/topics/llm_configuration.ipynb similarity index 98% rename from website/docs/llm_configuration.ipynb rename to website/docs/topics/llm_configuration.ipynb index e7fad3cf3b9e..8c6a12211aa8 100644 --- a/website/docs/llm_configuration.ipynb +++ b/website/docs/topics/llm_configuration.ipynb @@ -161,7 +161,7 @@ "Being a list allows you to define multiple models that can be used by the agent. This is useful for a few reasons:\n", "\n", "- If one model times out or fails, the agent can try another model.\n", - "- Having a single global list of models and [filtering it](/docs/llm_configuration#config-list-filtering) based on certain keys (e.g. name, tag) in order to pass select models into a certain agent (e.g. use cheaper GPT 3.5 for agents solving easier tasks)\n", + "- Having a single global list of models and [filtering it](#config-list-filtering) based on certain keys (e.g. name, tag) in order to pass select models into a certain agent (e.g. use cheaper GPT 3.5 for agents solving easier tasks)\n", "- While the core agents, (e.g. conversable or assistant) do not have special logic around selecting configs, some of the specialized agents *may* have logic to select the best model based on the task at hand.\n", "\n", "### How does an agent decide which model to pick out of the list?\n", diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index c4a7d95a31a4..995444dad4f3 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -183,7 +183,7 @@ module.exports = { { redirects: [ { - to: "/docs/llm_configuration/", + to: "/docs/topics/llm_configuration", from: ["/docs/llm_endpoint_configuration/"], }, { @@ -194,6 +194,10 @@ module.exports = { to: "/docs/Getting-Started", from: ["/docs/"], }, + { + to: "/docs/topics/llm_configuration", + from: ["/docs/llm_configuration"], + }, ], }, ] diff --git a/website/sidebars.js b/website/sidebars.js index 70f07465baee..dfeded23b209 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -22,7 +22,7 @@ id: "installation/Installation" }, }, - 'llm_configuration', + {'Topics': [{type: 'autogenerated', dirName: 'topics'}]}, {'Use Cases': [{type: 'autogenerated', dirName: 'Use-Cases'}]}, 'Contribute', 'Research',