From ed24de84674493d11db289ec5a049110a42f68de Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Wed, 26 Jul 2023 16:45:23 -0700 Subject: [PATCH] removed namespace title (#8208) This change compacts the left-side Navbar (ToC) of the [API Reference](https://api.python.langchain.com/en/latest/api_reference.html). Now almost each namespace item is split into two lines. For example `langchain.chat_models: Chat Models` We remove the `Chat Models` and leave one the `langchain.chat_models`. This effectively compacts the navbar and increases the main page's usability. On my screen, it reduces # of lines in Toc from 28 t to 18, which is huge. Removing the namespace "title" (like `Chat Models`) does not remove any information because the title is composed directly from the namespace. API Reference users are developers. Usability for them is very important. We see less text => we find faster. --- docs/api_reference/create_api_rst.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/docs/api_reference/create_api_rst.py b/docs/api_reference/create_api_rst.py index d62944c9ec..b60e9d4284 100644 --- a/docs/api_reference/create_api_rst.py +++ b/docs/api_reference/create_api_rst.py @@ -40,11 +40,7 @@ API Reference functions = _members["functions"] if not (classes or functions): continue - - module_title = module.replace("_", " ").title() - if module_title == "Llms": - module_title = "LLMs" - section = f":mod:`langchain.{module}`: {module_title}" + section = f":mod:`langchain.{module}`" full_doc += f"""\ {section} {'=' * (len(section) + 1)}