docs: baseUrl for ganalytics, throw on broken links (#21455)

This commit is contained in:
Erick Friis 2024-05-10 06:49:59 -07:00 committed by GitHub
parent 913792f5e6
commit 64c47224a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 23 additions and 22 deletions

View File

@ -811,9 +811,10 @@
"\n", "\n",
"If you want to continue using LangChain agents, some good advanced guides are:\n", "If you want to continue using LangChain agents, some good advanced guides are:\n",
"\n", "\n",
"- [How to create a custom agent](/docs/how_to/custom_agent)\n", "- [How to use LangGraph's built-in versions of `AgentExecutor`](/docs/how_to/migrate_agent)\n",
"- [How to stream responses from an agent](/docs/how_to/agents_streaming)\n", "- [How to create a custom agent](https://python.langchain.com/v0.1/docs/modules/agents/how_to/custom_agent/)\n",
"- [How to return structured output from an agent](/docs/how_to/agent_structured)" "- [How to stream responses from an agent](https://python.langchain.com/v0.1/docs/modules/agents/how_to/streaming/)\n",
"- [How to return structured output from an agent](https://python.langchain.com/v0.1/docs/modules/agents/how_to/agent_structured/)"
] ]
}, },
{ {

View File

@ -670,8 +670,6 @@
"\n", "\n",
"- **Output parsing**: See [OpenAI Tools output\n", "- **Output parsing**: See [OpenAI Tools output\n",
" parsers](/docs/how_to/output_parser_structured)\n", " parsers](/docs/how_to/output_parser_structured)\n",
" and [OpenAI Functions output\n",
" parsers](/docs/modules/model_io/output_parsers/types/openai_functions/)\n",
" to learn about extracting the function calling API responses into\n", " to learn about extracting the function calling API responses into\n",
" various formats.\n", " various formats.\n",
"- **Structured output chains**: [Some models have constructors](/docs/how_to/structured_output) that\n", "- **Structured output chains**: [Some models have constructors](/docs/how_to/structured_output) that\n",

View File

@ -31,7 +31,7 @@
"\n", "\n",
"The simpler the input to a tool is, the easier it is for an LLM to be able to use it.\n", "The simpler the input to a tool is, the easier it is for an LLM to be able to use it.\n",
"Many agents will only work with tools that have a single string input.\n", "Many agents will only work with tools that have a single string input.\n",
"For a list of agent types and which ones work with more complicated inputs, please see [this documentation](../agents/agent_types)\n", "For a list of agent types and which ones work with more complicated inputs, please see [this documentation](https://python.langchain.com/v0.1/docs/modules/agents/agent_types/)\n",
"\n", "\n",
"Importantly, the name, description, and JSON schema (if used) are all used in the prompt. Therefore, it is really important that they are clear and describe exactly how the tool should be used. You may need to change the default name, description, or JSON schema if the LLM is not understanding how to use the tool.\n", "Importantly, the name, description, and JSON schema (if used) are all used in the prompt. Therefore, it is really important that they are clear and describe exactly how the tool should be used. You may need to change the default name, description, or JSON schema if the LLM is not understanding how to use the tool.\n",
"\n", "\n",
@ -409,11 +409,11 @@
"\n", "\n",
"**[Built-In Tools](/docs/integrations/tools/)**: For a list of all built-in tools, see [this page](/docs/integrations/tools/)\n", "**[Built-In Tools](/docs/integrations/tools/)**: For a list of all built-in tools, see [this page](/docs/integrations/tools/)\n",
" \n", " \n",
"**[Custom Tools](./custom_tools)**: Although built-in tools are useful, it's highly likely that you'll have to define your own tools. See [this guide](./custom_tools) for instructions on how to do so.\n", "**[Custom Tools](/docs/how_to/custom_tools)**: Although built-in tools are useful, it's highly likely that you'll have to define your own tools. See [this guide](/docs/how_to/custom_tools) for instructions on how to do so.\n",
" \n", " \n",
"**[Toolkits](./toolkits)**: Toolkits are collections of tools that work well together. For a more in depth description as well as a list of all built-in toolkits, see [this page](./toolkits)\n", "**[Toolkits](/docs/how_to/toolkits)**: Toolkits are collections of tools that work well together. For a more in depth description as well as a list of all built-in toolkits, see [this page](/docs/how_to/toolkits)\n",
"\n", "\n",
"**[Tools as OpenAI Functions](./tools_as_openai_functions)**: Tools are very similar to OpenAI Functions, and can easily be converted to that format. See [this notebook](./tools_as_openai_functions) for instructions on how to do that.\n", "**[Tools as OpenAI Functions](/docs/how_to/tools_as_openai_functions/)**: Tools are very similar to OpenAI Functions, and can easily be converted to that format. See [this notebook](/docs/how_to/tools_as_openai_functions) for instructions on how to do that.\n",
"\n" "\n"
] ]
}, },

View File

@ -54,9 +54,9 @@ These are the best ones to get started with:
Explore the full list of tutorials [here](/docs/tutorials). Explore the full list of tutorials [here](/docs/tutorials).
## [How-To Guides](/docs/how_to_guides) ## [How-To Guides](/docs/how_to)
[Here](/docs/how_to_guides) youll find short answers to “How do I….?” types of questions. [Here](/docs/how_to) youll find short answers to “How do I….?” types of questions.
These how-to guides dont cover topics in depth youll find that material in the [Tutorials](/docs/tutorials) and the [API Reference](https://api.python.langchain.com/en/latest/). These how-to guides dont cover topics in depth youll find that material in the [Tutorials](/docs/tutorials) and the [API Reference](https://api.python.langchain.com/en/latest/).
However, these guides will help you quickly accomplish common tasks. However, these guides will help you quickly accomplish common tasks.

View File

@ -12,7 +12,7 @@
"[LangSmith](https://smith.langchain.com) helps you trace and evaluate your language model applications and intelligent agents to help you\n", "[LangSmith](https://smith.langchain.com) helps you trace and evaluate your language model applications and intelligent agents to help you\n",
"move from prototype to production.\n", "move from prototype to production.\n",
"\n", "\n",
"Check out the [interactive walkthrough](/docs/langsmith/walkthrough) to get started.\n", "Check out the interactive walkthrough on this page to get started.\n",
"\n", "\n",
"For more information, please refer to the [LangSmith documentation](https://docs.smith.langchain.com/).\n", "For more information, please refer to the [LangSmith documentation](https://docs.smith.langchain.com/).\n",
"\n", "\n",

View File

@ -29,7 +29,7 @@
"Note that this chatbot that we build will only use the language model to have a conversation.\n", "Note that this chatbot that we build will only use the language model to have a conversation.\n",
"There are several other related concepts that you may be looking for:\n", "There are several other related concepts that you may be looking for:\n",
"\n", "\n",
"- [Conversational RAG](TODO): Enable a chatbot experience over an external source of data\n", "- [Conversational RAG](/docs/tutorials/qa_chat_history): Enable a chatbot experience over an external source of data\n",
"- [Agents](/docs/tutorials/agents): Build a chatbot that can take actions\n", "- [Agents](/docs/tutorials/agents): Build a chatbot that can take actions\n",
"\n", "\n",
"This tutorial will cover the basics which will be helpful for those two more advanced topics, but feel free to skip directly to there should you choose.\n", "This tutorial will cover the basics which will be helpful for those two more advanced topics, but feel free to skip directly to there should you choose.\n",
@ -966,7 +966,7 @@
"\n", "\n",
"Now that you understand the basics of how to create a chatbot in LangChain, some more advanced tutorials you may be interested in are:\n", "Now that you understand the basics of how to create a chatbot in LangChain, some more advanced tutorials you may be interested in are:\n",
"\n", "\n",
"- [Conversational RAG](TODO): Enable a chatbot experience over an external source of data\n", "- [Conversational RAG](/docs/tutorials/qa_chat_history): Enable a chatbot experience over an external source of data\n",
"- [Agents](/docs/tutorials/agents): Build a chatbot that can take actions\n", "- [Agents](/docs/tutorials/agents): Build a chatbot that can take actions\n",
"\n", "\n",
"If you want to dive deeper on specifics, some things worth checking out are:\n", "If you want to dive deeper on specifics, some things worth checking out are:\n",

View File

@ -194,7 +194,7 @@
"source": [ "source": [
"We need to use a model that supports function/tool calling.\n", "We need to use a model that supports function/tool calling.\n",
"\n", "\n",
"Please review [the documentation](/docs/concepts/function-tool-calling) for list of some models that can be used with this API." "Please review [the documentation](/docs/concepts#function-tool-calling) for list of some models that can be used with this API."
] ]
}, },
{ {

View File

@ -424,7 +424,7 @@
"`TextSplitter`: Object that splits a list of `Document`s into smaller\n", "`TextSplitter`: Object that splits a list of `Document`s into smaller\n",
"chunks. Subclass of `DocumentTransformer`s.\n", "chunks. Subclass of `DocumentTransformer`s.\n",
"\n", "\n",
"- Explore [context-aware splitters](category/text-splitters/), which keep the location (“context”) of each\n", "- Explore [context-aware splitters](/docs/how_to#text-splitters), which keep the location (“context”) of each\n",
" split in the original `Document`\n", " split in the original `Document`\n",
"- [Code (py or js)](/docs/integrations/document_loaders/source_code)\n", "- [Code (py or js)](/docs/integrations/document_loaders/source_code)\n",
"- [Scientific papers](/docs/integrations/document_loaders/grobid)\n", "- [Scientific papers](/docs/integrations/document_loaders/grobid)\n",

View File

@ -9,6 +9,8 @@ require("dotenv").config();
const baseLightCodeBlockTheme = require("prism-react-renderer/themes/vsLight"); const baseLightCodeBlockTheme = require("prism-react-renderer/themes/vsLight");
const baseDarkCodeBlockTheme = require("prism-react-renderer/themes/vsDark"); const baseDarkCodeBlockTheme = require("prism-react-renderer/themes/vsDark");
const baseUrl = "/v0.2/";
/** @type {import('@docusaurus/types').Config} */ /** @type {import('@docusaurus/types').Config} */
const config = { const config = {
title: "🦜️🔗 LangChain", title: "🦜️🔗 LangChain",
@ -18,10 +20,10 @@ const config = {
url: "https://python.langchain.com", url: "https://python.langchain.com",
// Set the /<baseUrl>/ pathname under which your site is served // Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/' // For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: "/v0.2/", baseUrl: baseUrl,
trailingSlash: true, trailingSlash: true,
onBrokenLinks: "warn", onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn", onBrokenMarkdownLinks: "throw",
themes: ["@docusaurus/theme-mermaid"], themes: ["@docusaurus/theme-mermaid"],
markdown: { markdown: {
@ -315,7 +317,7 @@ const config = {
}), }),
scripts: [ scripts: [
"/js/google_analytics.js", baseUrl + "js/google_analytics.js",
{ {
src: "https://www.googletagmanager.com/gtag/js?id=G-9B66JQQH2F", src: "https://www.googletagmanager.com/gtag/js?id=G-9B66JQQH2F",
async: true, async: true,

View File

@ -193,8 +193,8 @@ def get_chat_model_table() -> str:
"Async invoke", "Async invoke",
"Stream", "Stream",
"Async stream", "Async stream",
"[Tool calling](/docs/modules/model_io/chat/function_calling/)", "[Tool calling](/docs/how_to/tool_calling/)",
"[Structured output](/docs/modules/model_io/chat/structured_output/)", "[Structured output](/docs/how_to/structured_output/)",
"Python Package", "Python Package",
] ]
rows = [title, [":-"] + [":-:"] * (len(title) - 1)] rows = [title, [":-"] + [":-:"] * (len(title) - 1)]