docs: reorg and visual refresh (#19765)

- put use cases in main sidebar
- move modules to own sidebar, rename components
- cleanup lcel section
- cleanup guides
- update font, cell highlighting

---------

Co-authored-by: Chester Curme <chester.curme@gmail.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Jacob Lee
2024-04-04 00:58:36 -07:00
committed by GitHub
parent 51bdfe04e9
commit 605c3f23e1
186 changed files with 4361 additions and 5124 deletions

View File

@@ -18,7 +18,7 @@
Create as many sidebars as you want.
*/
module.exports = {
module.exports = {
// By default, Docusaurus generates a sidebar from the docs folder structure
docs: [
{
@@ -26,18 +26,111 @@ module.exports = {
label: "Get started",
collapsed: false,
collapsible: false,
items: [{ type: "autogenerated", dirName: "get_started" }, "security"],
items: [{ type: "autogenerated", dirName: "get_started" }],
link: {
type: 'generated-index',
description: 'Get started with LangChain',
slug: "get_started",
type: 'doc',
id: "get_started/introduction"
},
},
{
type: "category",
label: "LangChain Expression Language",
label: "Use cases",
collapsed: false,
items: [{ type: "autogenerated", dirName: "expression_language" } ],
collapsible: false,
items: [
{
type: "category",
label: "Q&A with RAG",
collapsed: true,
items: [
"use_cases/question_answering/quickstart",
"use_cases/question_answering/chat_history",
"use_cases/question_answering/streaming",
"use_cases/question_answering/sources",
"use_cases/question_answering/citations",
{
type: "category",
label: "More",
collapsed: true,
items: [
"use_cases/question_answering/per_user",
"use_cases/question_answering/conversational_retrieval_agents",
"use_cases/question_answering/local_retrieval_qa",
]
},
],
link: { type: "doc", id: "use_cases/question_answering/index" }
},
{
type: "category",
label: "Extracting structured output",
link: { type: "doc", id: "use_cases/extraction/index" },
collapsed: true,
items: [
"use_cases/extraction/quickstart",
"use_cases/extraction/guidelines",
"use_cases/extraction/how_to/examples",
{
type: "category",
label: "More",
collapsed: true,
items: [
"use_cases/extraction/how_to/handle_long_text",
"use_cases/extraction/how_to/handle_files",
"use_cases/extraction/how_to/parse",
]
},
]
},
{ type: "category", label: "Chatbots", collapsed: true, items: [{ type: "autogenerated", dirName: "use_cases/chatbots" }], link: { type: "doc", id: "use_cases/chatbots/index" } },
{ type: "category", label: "Tool use and agents", collapsed: true, items: [{ type: "autogenerated", dirName: "use_cases/tool_use" }], link: { type: "doc", id: "use_cases/tool_use/index" } },
{ type: "category", label: "Query analysis", collapsed: true, items: [{ type: "autogenerated", dirName: "use_cases/query_analysis" }], link: { type: "doc", id: "use_cases/query_analysis/index" } },
{ type: "category", label: "Q&A over SQL + CSV", collapsed: true, items: [{ type: "autogenerated", dirName: "use_cases/sql" }], link: { type: "doc", id: "use_cases/sql/index" } },
{
type: "category",
label: "More",
collapsed: true,
items: [
// "use_cases/apis",
{ type: "category", label: "Graphs", collapsed: true, items: [{ type: "autogenerated", dirName: "use_cases/graph", }], link: { type: "doc", id: "use_cases/graph/index" } },
"use_cases/code_understanding",
"use_cases/data_generation",
"use_cases/tagging",
"use_cases/summarization",
"use_cases/web_scraping"
]
}
],
link: {
type: 'doc',
id: "use_cases/index"
},
},
{
type: "category",
label: "Expression Language",
collapsed: false,
collapsible: false,
items: [
"expression_language/get_started",
"expression_language/interface",
{ type: "category", label: "Primitives", collapsed: true, items: [{ type: "autogenerated", dirName: "expression_language/primitives", }], link: { type: "doc", id: "expression_language/primitives/index" } },
"expression_language/why",
"expression_language/streaming",
"expression_language/how_to/message_history",
{
type: "category",
label: "More",
collapsed: true,
items: [
"expression_language/how_to/routing",
"expression_language/how_to/inspect",
"expression_language/how_to/decorator",
"expression_language/cookbook/prompt_size",
"expression_language/cookbook/multiple_chains",
]
},
],
link: {
type: 'doc',
id: "expression_language/index"
@@ -45,40 +138,129 @@ module.exports = {
},
{
type: "category",
label: "Modules",
label: "Ecosystem",
collapsed: false,
collapsible: false,
items: [
{ type: "category", label: "Model I/O", collapsed: true, items: [{type:"autogenerated", dirName: "modules/model_io" }], link: { type: 'doc', id: "modules/model_io/index" }},
{ type: "category", label: "Retrieval", collapsed: true, items: [{type:"autogenerated", dirName: "modules/data_connection" }], link: { type: 'doc', id: "modules/data_connection/index" }},
{ type: "category", label: "Agents", collapsed: true, items: [{type:"autogenerated", dirName: "modules/agents" }], link: { type: 'doc', id: "modules/agents/index" }},
"modules/chains",
{
type: "category",
label: "More",
label: "🦜🛠️ LangSmith",
collapsed: true,
items: [
{ type: "category", label: "Memory", collapsed: true, items: [{type:"autogenerated", dirName: "modules/memory" }], link: { type: 'doc', id: "modules/memory/index" }},
{ type: "category", label: "Callbacks", collapsed: true, items: [{type:"autogenerated", dirName: "modules/callbacks" }], link: { type: 'doc', id: "modules/callbacks/index" }},
]
}
],
link: {
type: 'doc',
id: "modules/index"
},
items: [{ type: "autogenerated", dirName: "langsmith" } ],
link: {
type: 'doc',
id: "langsmith/index"
},
},
"langgraph",
"langserve",
]
},
{type: "doc", id: "langserve", label: "LangServe"},
"security"
],
components: [
{
type: "category",
label: "LangSmith",
collapsed: true,
items: [{ type: "autogenerated", dirName: "langsmith" } ],
link: {
type: 'doc',
id: "langsmith/index"
},
label: "Model I/O",
collapsed: false,
collapsible: false,
link: { type: "doc", id: "modules/model_io/index" },
items: [
{
type: "category",
label: "Prompts",
items: [{ type: "autogenerated", dirName: "modules/model_io/prompts" }],
link: { type: "doc", id: "modules/model_io/prompts/index" }
},
{
type: "category",
label: "Chat models",
items: [{ type: "autogenerated", dirName: "modules/model_io/chat" }],
link: { type: "doc", id: "modules/model_io/chat/index" }
},
{
type: "category",
label: "LLMs",
items: [{ type: "autogenerated", dirName: "modules/model_io/llms" }],
link: { type: "doc", id: "modules/model_io/llms/index" }
},
{
type: "category",
label: "Output parsers",
items: [{ type: "autogenerated", dirName: "modules/model_io/output_parsers" }],
link: { type: "doc", id: "modules/model_io/output_parsers/index" }
},
],
},
{type: "doc", id: "langgraph", label: "LangGraph"},
{
type: "category",
label: "Retrieval",
collapsed: false,
collapsible: false,
link: { type: "doc", id: "modules/data_connection/index" },
items: [
{
type: "category",
label: "Document loaders",
items: [{ type: "autogenerated", dirName: "modules/data_connection/document_loaders" }],
link: { type: "doc", id: "modules/data_connection/document_loaders/index" }
},
{
type: "category",
label: "Text splitters",
items: [{ type: "autogenerated", dirName: "modules/data_connection/document_transformers" }],
link: { type: "doc", id: "modules/data_connection/document_transformers/index" }
},
{
type: "category",
label: "Embedding models",
items: [{ type: "autogenerated", dirName: "modules/data_connection/text_embedding" }],
link: { type: "doc", id: "modules/data_connection/text_embedding/index" }
},
"modules/data_connection/vectorstores/index",
{
type: "category",
label: "Retrievers",
items: [{ type: "autogenerated", dirName: "modules/data_connection/retrievers" }],
link: { type: "doc", id: "modules/data_connection/retrievers/index" }
},
"modules/data_connection/indexing"
],
},
{
type: "category",
label: "Composition",
collapsed: false,
collapsible: false,
items: [
{ type: "category", label: "Tools", collapsed: true, items: [{ type: "autogenerated", dirName: "modules/tools" }], link: { type: 'doc', id: "modules/tools/index" }},
{ type: "category", label: "Agents", collapsed: true, items: [{ type: "autogenerated", dirName: "modules/agents" }], link: { type: 'doc', id: "modules/agents/index" }},
"modules/chains"
],
link: { type: "doc", id: "modules/composition" }
},
{
type: "category",
label: "More",
collapsed: true,
items: [
{ type: "category", label: "Memory", collapsed: true, items: [
"modules/memory/chat_messages/index",
{type: "category", label: "Memory classes [BETA]", collapsed: true, items: [
"modules/memory/adding_memory",
"modules/memory/adding_memory_chain_multiple_inputs",
"modules/memory/agent_with_memory",
"modules/memory/agent_with_memory_in_db",
"modules/memory/conversational_customization",
"modules/memory/custom_memory",
"modules/memory/multiple_memory",
{ type: "category", label: "Types", collapsed: true, items: [{ type: "autogenerated", dirName: "modules/memory/types" }]}
]}
], link: { type: 'doc', id: "modules/memory/index" }},
{ type: "category", label: "Callbacks", collapsed: true, items: [{type:"autogenerated", dirName: "modules/callbacks" }], link: { type: 'doc', id: "modules/callbacks/index" }},
]
},
{ type: "doc", id: "modules/index", className: "hidden" },
],
integrations: [
{
@@ -99,8 +281,8 @@ module.exports = {
label: "Components",
collapsible: false,
items: [
{ type: "category", label: "LLMs", collapsed: true, items: [{type:"autogenerated", dirName: "integrations/llms" }], link: { type: 'doc', id: "integrations/llms/index"}},
{ type: "category", label: "Chat models", collapsed: true, items: [{type:"autogenerated", dirName: "integrations/chat" }], link: { type: 'doc', id: "integrations/chat/index"}},
{ type: "category", label: "LLMs", collapsed: true, items: [{type:"autogenerated", dirName: "integrations/llms" }], link: { type: 'doc', id: "integrations/llms/index"}},
{ type: "category", label: "Embedding models", collapsed: true, items: [{type: "autogenerated", dirName: "integrations/text_embedding" }], link: {type: "generated-index", slug: "integrations/text_embedding" }},
{ type: "category", label: "Document loaders", collapsed: true, items: [{type:"autogenerated", dirName: "integrations/document_loaders" }], link: {type: "generated-index", slug: "integrations/document_loaders" }},
{ type: "category", label: "Document transformers", collapsed: true, items: [{type: "autogenerated", dirName: "integrations/document_transformers" }], link: {type: "generated-index", slug: "integrations/document_transformers" }},
@@ -120,18 +302,22 @@ module.exports = {
},
},
],
use_cases: [
guides: [
{
type: "category", label: "Development", collapsible: false, items: [{type: "autogenerated", dirName: "guides/development" }],
link: { type: "doc", id: "guides/development/index"},
},
{
type: "category",
label: "Use cases",
items: [
{ type: "autogenerated", dirName: "use_cases" },
],
link: { type: 'generated-index', slug: "use_cases"}
label: "Productionization",
collapsible: false,
items: [{type: "autogenerated", dirName: "guides/productionization" }],
link: {
type: "doc",
id: "guides/productionization/index",
}
},
],
guides: [
{type: "autogenerated", dirName: "guides" }
{ type: "doc", id: "guides/index", className: "hidden" },
],
templates: [
{
@@ -143,15 +329,7 @@ module.exports = {
link: { type: 'doc', id: "templates/index" }
},
],
changelog: [
{
type: "category",
label: "Changelog",
items: [{ type: "autogenerated", dirName: "changelog" }],
link: { type: 'generated-index', slug: "changelog"}
},
],
contributing: [
{type: "autogenerated", dirName: "contributing" }
{ type: "category", label: "Contributing", items: [{type: "autogenerated", dirName: "contributing" }] }
],
};