langchain-ai / langchainjs

πŸ¦œπŸ”— Build context-aware reasoning applications πŸ¦œπŸ”—
https://js.langchain.com/docs/
MIT License
11.88k stars 1.99k forks source link

DOC: v0.2 pages link back to themselves #5598

Open TonyGravagno opened 1 month ago

TonyGravagno commented 1 month ago

Checklist

Issue with current documentation:

https://js.langchain.com/v0.2/docs/integrations/chat/

At the bottom of the Chat Models page, the Next link refers back to the same page. This should link to the first chat model page, currently Alibaba Tongyi.

240529095905

Similarly :

At the bottom of the LLMs page, the Next link refers back to the same page. This should link to the first LLM page, currently AI21.

image

Similarly :

At the bottom of the Providers page, the Next link refers back to the same page. This should link to the first Partner Package page, currently Anthropic.

Others?

I checked the first page of other titles and from what I saw they all correctly point to the Next page, which is their first sub-category.

Idea or request for content:

No response

dosubot[bot] commented 1 month ago

To fix the "Next" links on the Chat Models, LLMs, and Providers documentation pages for version 0.2, you need to update the link property for each category to point to the correct first sub-category page. Here is the updated code snippet for the sidebars.js configuration:

module.exports = {
  docs: [
    "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",
        },
      ],
    },
    "concepts",
    {
      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/langgraphjs/",
          label: "πŸ¦œπŸ•ΈοΈ LangGraph.js",
        },
      ],
    },
    {
      type: "category",
      label: "Versions",
      collapsed: false,
      collapsible: false,
      items: [
        {
          type: "autogenerated",
          dirName: "versions",
        },
      ],
    },
    "security",
  ],
  integrations: [
    {
      type: "category",
      label: "Providers",
      collapsible: false,
      items: [
        {
          type: "autogenerated",
          dirName: "integrations/platforms",
        },
        {
          type: "category",
          label: "More",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/providers",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/providers",
          },
        },
      ],
      link: {
        type: "doc",
        id: "integrations/platforms/index",
      },
    },
    {
      type: "category",
      label: "Components",
      collapsible: false,
      items: [
        {
          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",
          },
        },
        {
          type: "category",
          label: "Vector stores",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/vectorstores",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/vectorstores",
          },
        },
        {
          type: "category",
          label: "Retrievers",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/retrievers",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/retrievers",
          },
        },
        {
          type: "category",
          label: "Tools",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/tools",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/tools",
          },
        },
        {
          type: "category",
          label: "Toolkits",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/toolkits",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/toolkits",
          },
        },
        {
          type: "category",
          label: "Memory",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/memory",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/memory",
          },
        },
        {
          type: "category",
          label: "Graphs",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/graphs",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/graphs",
          },
        },
        {
          type: "category",
          label: "Callbacks",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/callbacks",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/callbacks",
          },
        },
        {
          type: "category",
          label: "Chat loaders",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/chat_loaders",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/chat_loaders",
          },
        },
        {
          type: "category",
          label: "Adapters",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/adapters",
            },
          ],
          link: {
            type: "generated-index",
            slug: "integrations/adapters",
          },
        },
        {
          type: "category",
          label: "Stores",
          collapsed: true,
          items: [
            {
              type: "autogenerated",
              dirName: "integrations/stores",
            },
          ],
          link: {
            type: "doc",
            id: "integrations/stores/index",
          },
        },
      ],
      link: {
        type: "generated-index",
        slug: "integrations/components",
      },
    },
  ],
  contributing: [
    {
      type: "category",
      label: "Contributing",
      items: [
        {
          type: "autogenerated",
          dirName: "contributing",
        },
      ],
    },
  ],
};

Additionally, ensure the baseUrl is set correctly in the docusaurus.config.js file to /v0.2/:

const baseUrl = "/v0.2/";

This will ensure that the "Next" links for the "Chat Models", "LLMs", and "Providers" categories navigate to their respective first sub-category pages [1][2].

#### Details **About Dosu** This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a πŸ‘ if this is helpful and πŸ‘Ž if it is irrelevant.

To continue the conversation, mention @dosu.

jacoblee93 commented 1 month ago

Maybe we just hide these? CC @bracesproul