mirror of
https://github.com/hwchase17/langchain
synced 2024-11-20 03:25:56 +00:00
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.
This commit is contained in:
parent
c5988c1d4b
commit
ed24de8467
@ -40,11 +40,7 @@ API Reference
|
|||||||
functions = _members["functions"]
|
functions = _members["functions"]
|
||||||
if not (classes or functions):
|
if not (classes or functions):
|
||||||
continue
|
continue
|
||||||
|
section = f":mod:`langchain.{module}`"
|
||||||
module_title = module.replace("_", " ").title()
|
|
||||||
if module_title == "Llms":
|
|
||||||
module_title = "LLMs"
|
|
||||||
section = f":mod:`langchain.{module}`: {module_title}"
|
|
||||||
full_doc += f"""\
|
full_doc += f"""\
|
||||||
{section}
|
{section}
|
||||||
{'=' * (len(section) + 1)}
|
{'=' * (len(section) + 1)}
|
||||||
|
Loading…
Reference in New Issue
Block a user