mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-03 12:07:36 +00:00
**TL;DR much of the provided `Makefile` targets were broken, and any time I wanted to preview changes locally I either had to refer to a command Chester gave me or try waiting on a Vercel preview deployment. With this PR, everything should behave like normal.** Significant updates to the `Makefile` and documentation files, focusing on improving usability, adding clear messaging, and fixing/enhancing documentation workflows. ### Updates to `Makefile`: #### Enhanced build and cleaning processes: - Added informative messages (e.g., "📚 Building LangChain documentation...") to makefile targets like `docs_build`, `docs_clean`, and `api_docs_build` for better user feedback during execution. - Introduced a `clean-cache` target to the `docs` `Makefile` to clear cached dependencies and ensure clean builds. #### Improved dependency handling: - Modified `install-py-deps` to create a `.venv/deps_installed` marker, preventing redundant/duplicate dependency installations and improving efficiency. #### Streamlined file generation and infrastructure setup: - Added caching for the LangServe README download and parallelized feature table generation - Added user-friendly completion messages for targets like `copy-infra` and `render`. #### Documentation server updates: - Enhanced the `start` target with messages indicating server start and URL for local documentation viewing. --- ### Documentation Improvements: #### Content clarity and consistency: - Standardized section titles for consistency across documentation files. [[1]](diffhunk://#diff-9b1a85ea8a9dcf79f58246c88692cd7a36316665d7e05a69141cfdc50794c82aL1-R1) [[2]](diffhunk://#diff-944008ad3a79d8a312183618401fcfa71da0e69c75803eff09b779fc8e03183dL1-R1) - Refined phrasing and formatting in sections like "Dependency management" and "Formatting and linting" for better readability. [[1]](diffhunk://#diff-2069d4f956ab606ae6d51b191439283798adaf3a6648542c409d258131617059L6-R6) [[2]](diffhunk://#diff-2069d4f956ab606ae6d51b191439283798adaf3a6648542c409d258131617059L84-R82) #### Enhanced workflows: - Updated instructions for building and viewing documentation locally, including tips for specifying server ports and handling API reference previews. [[1]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L60-R94) [[2]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L82-R126) - Expanded guidance on cleaning documentation artifacts and using linting tools effectively. [[1]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L82-R126) [[2]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L107-R142) #### API reference documentation: - Improved instructions for generating and formatting in-code documentation, highlighting best practices for docstring writing. [[1]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L107-R142) [[2]](diffhunk://#diff-048deddcfd44b242e5b23aed9f2e9ec73afc672244ce14df2a0a316d95840c87L144-R186) --- ### Minor Changes: - Added support for a new package name (`langchain_v1`) in the API documentation generation script. - Fixed minor capitalization and formatting issues in documentation files. [[1]](diffhunk://#diff-2069d4f956ab606ae6d51b191439283798adaf3a6648542c409d258131617059L40-R40) [[2]](diffhunk://#diff-2069d4f956ab606ae6d51b191439283798adaf3a6648542c409d258131617059L166-R160) --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
470 lines
12 KiB
JavaScript
470 lines
12 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
/**
|
|
* Creating a sidebar enables you to:
|
|
- create an ordered group of docs
|
|
- render a sidebar for each doc of that group
|
|
- provide next/previous navigation
|
|
|
|
The sidebars can be generated from the filesystem, or explicitly defined here.
|
|
|
|
Create as many sidebars as you want.
|
|
*/
|
|
|
|
module.exports = {
|
|
docs: [
|
|
{
|
|
type: "doc",
|
|
label: "Introduction",
|
|
id: "introduction",
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'tutorials/index'},
|
|
label: "Tutorials",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'tutorials',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'how_to/index'},
|
|
label: "How-to guides",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'how_to',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'concepts/index'},
|
|
label: "Conceptual guide",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'concepts',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Ecosystem",
|
|
collapsed: false,
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "link",
|
|
href: "https://docs.smith.langchain.com/",
|
|
label: "🦜🛠️ LangSmith"
|
|
},
|
|
{
|
|
type: "link",
|
|
href: "https://langchain-ai.github.io/langgraph/",
|
|
label: "🦜🕸️ LangGraph"
|
|
},
|
|
],
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Versions",
|
|
collapsed: false,
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: 'doc',
|
|
id: 'versions/v0_3/index',
|
|
label: "v0.3",
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "v0.2",
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'versions/v0_2',
|
|
}],
|
|
},
|
|
{
|
|
type: 'doc',
|
|
id: "how_to/pydantic_compatibility",
|
|
label: "Pydantic compatibility",
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Migrating from v0.0 chains",
|
|
link: {type: 'doc', id: 'versions/migrating_chains/index'},
|
|
collapsible: false,
|
|
collapsed: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'versions/migrating_chains',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Upgrading to LangGraph memory",
|
|
link: {type: 'doc', id: 'versions/migrating_memory/index'},
|
|
collapsible: false,
|
|
collapsed: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'versions/migrating_memory',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
"versions/release_policy",
|
|
],
|
|
},
|
|
"security"
|
|
],
|
|
integrations: [
|
|
{
|
|
type: "category",
|
|
label: "Providers",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/anthropic",
|
|
},
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/aws",
|
|
},
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/google",
|
|
},
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/huggingface",
|
|
},
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/microsoft",
|
|
},
|
|
{
|
|
type: "doc",
|
|
id: "integrations/providers/openai",
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "More",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/providers",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/providers/all",
|
|
},
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/providers/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Components",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "category",
|
|
label: "Chat models",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/chat",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/chat/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Retrievers",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/retrievers",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/retrievers/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Tools/Toolkits",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/tools",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/tools/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Document loaders",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/document_loaders",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/document_loaders/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Vector stores",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/vectorstores",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/vectorstores/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Embedding models",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/text_embedding",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/text_embedding/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Other",
|
|
collapsed: true,
|
|
items: [
|
|
{
|
|
type: "category",
|
|
label: "LLMs",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/llms",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "doc",
|
|
id: "integrations/llms/index",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Key-value stores",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/stores",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/stores",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Document transformers",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/document_transformers",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/document_transformers",
|
|
},
|
|
},
|
|
"integrations/llm_caching",
|
|
{
|
|
type: "category",
|
|
label: "Graphs",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/graphs",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/graphs",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Message histories",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/memory",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/memory",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Callbacks",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/callbacks",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/callbacks",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Chat loaders",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/chat_loaders",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/chat_loaders",
|
|
},
|
|
},
|
|
{
|
|
type: "category",
|
|
label: "Adapters",
|
|
collapsible: false,
|
|
items: [
|
|
{
|
|
type: "autogenerated",
|
|
dirName: "integrations/adapters",
|
|
className: "hidden",
|
|
},
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/adapters",
|
|
},
|
|
},
|
|
],
|
|
},
|
|
|
|
],
|
|
link: {
|
|
type: "generated-index",
|
|
slug: "integrations/components",
|
|
},
|
|
},
|
|
],
|
|
contributing: [
|
|
{
|
|
type: "doc",
|
|
label: "Welcome Contributors",
|
|
id: "contributing/index",
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'contributing/tutorials/index'},
|
|
label: "Tutorials",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'contributing/tutorials',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'contributing/how_to/index'},
|
|
label: "How-to guides",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'contributing/how_to',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
{
|
|
type: "category",
|
|
link: {type: 'doc', id: 'contributing/reference/index'},
|
|
label: "Reference & FAQ",
|
|
collapsible: false,
|
|
items: [{
|
|
type: 'autogenerated',
|
|
dirName: 'contributing/reference',
|
|
className: 'hidden',
|
|
}],
|
|
},
|
|
],
|
|
};
|