From 919b8a387f27e4270f1cb6c3dbc040b22a5cbdb8 Mon Sep 17 00:00:00 2001 From: Leonid Ganeline Date: Wed, 21 Feb 2024 17:04:23 -0800 Subject: [PATCH] docs: sorting `Examples using ...` section (#17588) The API Reference docs. If the class has a long list of the examples that works with this class, then the `Examples using` list is [hard to comprehend](https://api.python.langchain.com/en/latest/llms/langchain_community.llms.openai.OpenAI.html#langchain-community-llms-openai-openai). If this list is sorted it would be much easier. - sorting the `Examples using ` list --- docs/api_reference/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api_reference/conf.py b/docs/api_reference/conf.py index 36f34a4459..6ba5c06d97 100644 --- a/docs/api_reference/conf.py +++ b/docs/api_reference/conf.py @@ -49,7 +49,7 @@ class ExampleLinksDirective(SphinxDirective): class_or_func_name = self.arguments[0] links = imported_classes.get(class_or_func_name, {}) list_node = nodes.bullet_list() - for doc_name, link in links.items(): + for doc_name, link in sorted(links.items()): item_node = nodes.list_item() para_node = nodes.paragraph() link_node = nodes.reference()