|
| 1 | +/* eslint-disable import/no-extraneous-dependencies */ |
| 2 | +/* eslint-disable no-nested-ternary */ |
| 3 | +import React from "react"; |
| 4 | +import { translate } from "@docusaurus/Translate"; |
| 5 | +import { PageMetadata } from "@docusaurus/theme-common"; |
| 6 | +import Layout from "@theme/Layout"; |
| 7 | + |
| 8 | +import { useLocation } from "react-router-dom"; |
| 9 | + |
| 10 | +function LegacyBadge() { |
| 11 | + return <span className="badge badge--secondary">LEGACY</span>; |
| 12 | +} |
| 13 | + |
| 14 | +const suggestedLinks = { |
| 15 | + "/docs/additional_resources/tutorials/expression_language_cheatsheet/": { |
| 16 | + canonical: "/docs/how_to/lcel_cheatsheet/", |
| 17 | + alternative: [ |
| 18 | + "/v0.1/docs/additional_resources/tutorials/expression_language_cheatsheet/", |
| 19 | + ], |
| 20 | + }, |
| 21 | + "/docs/ecosystem/": { |
| 22 | + canonical: "/docs/integrations/platforms/", |
| 23 | + alternative: ["/v0.1/docs/ecosystem/"], |
| 24 | + }, |
| 25 | + "/docs/ecosystem/integrations/": { |
| 26 | + canonical: "/docs/integrations/platforms/", |
| 27 | + alternative: ["/v0.1/docs/ecosystem/integrations/"], |
| 28 | + }, |
| 29 | + "/docs/ecosystem/integrations/databerry/": { |
| 30 | + canonical: "/docs/integrations/platforms/", |
| 31 | + alternative: ["/v0.1/docs/ecosystem/integrations/databerry/"], |
| 32 | + }, |
| 33 | + "/docs/ecosystem/integrations/helicone/": { |
| 34 | + canonical: "/docs/integrations/platforms/", |
| 35 | + alternative: ["/v0.1/docs/ecosystem/integrations/helicone/"], |
| 36 | + }, |
| 37 | + "/docs/ecosystem/integrations/lunary/": { |
| 38 | + canonical: "/docs/integrations/platforms/", |
| 39 | + alternative: ["/v0.1/docs/ecosystem/integrations/lunary/"], |
| 40 | + }, |
| 41 | + "/docs/ecosystem/integrations/makersuite/": { |
| 42 | + canonical: "/docs/integrations/platforms/", |
| 43 | + alternative: ["/v0.1/docs/ecosystem/integrations/makersuite/"], |
| 44 | + }, |
| 45 | + "/docs/ecosystem/integrations/unstructured/": { |
| 46 | + canonical: "/docs/integrations/document_loaders/file_loaders/unstructured/", |
| 47 | + alternative: ["/v0.1/docs/ecosystem/integrations/unstructured/"], |
| 48 | + }, |
| 49 | + "/docs/ecosystem/langserve/": { |
| 50 | + canonical: |
| 51 | + "https://api.js.langchain.com/classes/_langchain_core.runnables_remote.RemoteRunnable.html", |
| 52 | + alternative: ["/v0.1/docs/ecosystem/langserve/"], |
| 53 | + }, |
| 54 | + "/docs/expression_language/": { |
| 55 | + canonical: "/docs/how_to/#langchain-expression-language-lcel", |
| 56 | + alternative: ["/v0.1/docs/expression_language/"], |
| 57 | + }, |
| 58 | + "/docs/expression_language/cookbook/": { |
| 59 | + canonical: "/docs/how_to/#langchain-expression-language-lcel", |
| 60 | + alternative: ["/v0.1/docs/expression_language/cookbook/"], |
| 61 | + }, |
| 62 | + "/docs/expression_language/cookbook/adding_memory/": { |
| 63 | + canonical: "/docs/how_to/message_history", |
| 64 | + alternative: ["/v0.1/docs/expression_language/cookbook/adding_memory/"], |
| 65 | + }, |
| 66 | + "/docs/expression_language/cookbook/agents/": { |
| 67 | + canonical: "/docs/how_to/agent_executor", |
| 68 | + alternative: ["/v0.1/docs/expression_language/cookbook/agents/"], |
| 69 | + }, |
| 70 | + "/docs/expression_language/cookbook/multiple_chains/": { |
| 71 | + canonical: "/docs/how_to/parallel", |
| 72 | + alternative: ["/v0.1/docs/expression_language/cookbook/multiple_chains/"], |
| 73 | + }, |
| 74 | + "/docs/expression_language/cookbook/prompt_llm_parser/": { |
| 75 | + canonical: "/docs/tutorials/llm_chain", |
| 76 | + alternative: ["/v0.1/docs/expression_language/cookbook/prompt_llm_parser/"], |
| 77 | + }, |
| 78 | + "/docs/expression_language/cookbook/retrieval/": { |
| 79 | + canonical: "/docs/tutorials/rag", |
| 80 | + alternative: ["/v0.1/docs/expression_language/cookbook/retrieval/"], |
| 81 | + }, |
| 82 | + "/docs/expression_language/cookbook/sql_db/": { |
| 83 | + canonical: "/docs/tutorials/sql_qa", |
| 84 | + alternative: ["/v0.1/docs/expression_language/cookbook/sql_db/"], |
| 85 | + }, |
| 86 | + "/docs/expression_language/cookbook/tools/": { |
| 87 | + canonical: "/docs/how_to/tool_calling/", |
| 88 | + alternative: ["/v0.1/docs/expression_language/cookbook/tools/"], |
| 89 | + }, |
| 90 | + "/docs/expression_language/get_started/": { |
| 91 | + canonical: "/docs/how_to/sequence", |
| 92 | + alternative: ["/v0.1/docs/expression_language/get_started/"], |
| 93 | + }, |
| 94 | + "/docs/expression_language/how_to/map/": { |
| 95 | + canonical: "/docs/how_to/cancel_execution/", |
| 96 | + alternative: ["/v0.1/docs/expression_language/how_to/map/"], |
| 97 | + }, |
| 98 | + "/docs/expression_language/how_to/message_history/": { |
| 99 | + canonical: "/docs/how_to/message_history", |
| 100 | + alternative: ["/v0.1/docs/expression_language/how_to/message_history/"], |
| 101 | + }, |
| 102 | + "/docs/expression_language/how_to/routing/": { |
| 103 | + canonical: "/docs/how_to/routing", |
| 104 | + alternative: ["/v0.1/docs/expression_language/how_to/routing/"], |
| 105 | + }, |
| 106 | + "/docs/expression_language/how_to/with_history/": { |
| 107 | + canonical: "/docs/how_to/message_history", |
| 108 | + alternative: ["/v0.1/docs/expression_language/how_to/with_history/"], |
| 109 | + }, |
| 110 | + "/docs/expression_language/interface/": { |
| 111 | + canonical: "/docs/how_to/lcel_cheatsheet", |
| 112 | + alternative: ["/v0.1/docs/expression_language/interface/"], |
| 113 | + }, |
| 114 | + "/docs/expression_language/streaming/": { |
| 115 | + canonical: "/docs/how_to/streaming", |
| 116 | + alternative: ["/v0.1/docs/expression_language/streaming/"], |
| 117 | + }, |
| 118 | + "/docs/expression_language/why/": { |
| 119 | + canonical: "/docs/concepts/#langchain-expression-language-lcel", |
| 120 | + alternative: ["/v0.1/docs/expression_language/why/"], |
| 121 | + }, |
| 122 | + "/docs/get_started/": { |
| 123 | + canonical: "/docs/introduction/", |
| 124 | + alternative: ["/v0.1/docs/get_started/"], |
| 125 | + }, |
| 126 | + "/docs/get_started/installation/": { |
| 127 | + canonical: "/docs/tutorials/", |
| 128 | + alternative: ["/v0.1/docs/get_started/installation/"], |
| 129 | + }, |
| 130 | + "/docs/get_started/introduction/": { |
| 131 | + canonical: "/docs/tutorials/", |
| 132 | + alternative: ["/v0.1/docs/get_started/introduction/"], |
| 133 | + }, |
| 134 | + "/docs/get_started/quickstart/": { |
| 135 | + canonical: "/docs/tutorials/", |
| 136 | + alternative: ["/v0.1/docs/get_started/quickstart/"], |
| 137 | + }, |
| 138 | + "/docs/guides/": { |
| 139 | + canonical: "/docs/how_to/", |
| 140 | + alternative: ["/v0.1/docs/guides/"], |
| 141 | + }, |
| 142 | + "/docs/guides/debugging/": { |
| 143 | + canonical: "/docs/how_to/debugging", |
| 144 | + alternative: ["/v0.1/docs/guides/debugging/"], |
| 145 | + }, |
| 146 | + "/docs/guides/deployment/": { |
| 147 | + canonical: "https://langchain-ai.github.io/langgraph/cloud/", |
| 148 | + alternative: ["/v0.1/docs/guides/deployment/"], |
| 149 | + }, |
| 150 | + "/docs/guides/deployment/nextjs/": { |
| 151 | + canonical: "https://github.com/langchain-ai/langchain-nextjs-template", |
| 152 | + alternative: ["/v0.1/docs/guides/deployment/nextjs/"], |
| 153 | + }, |
| 154 | + "/docs/guides/deployment/sveltekit/": { |
| 155 | + canonical: "https://github.com/langchain-ai/langchain-nextjs-template", |
| 156 | + alternative: ["/v0.1/docs/guides/deployment/sveltekit/"], |
| 157 | + }, |
| 158 | + "/docs/guides/evaluation/": { |
| 159 | + canonical: |
| 160 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 161 | + alternative: ["/v0.1/docs/guides/evaluation/"], |
| 162 | + }, |
| 163 | + "/docs/guides/evaluation/comparison/": { |
| 164 | + canonical: |
| 165 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 166 | + alternative: ["/v0.1/docs/guides/evaluation/comparison/"], |
| 167 | + }, |
| 168 | + "/docs/guides/evaluation/comparison/pairwise_embedding_distance/": { |
| 169 | + canonical: |
| 170 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 171 | + alternative: [ |
| 172 | + "/v0.1/docs/guides/evaluation/comparison/pairwise_embedding_distance/", |
| 173 | + ], |
| 174 | + }, |
| 175 | + "/docs/guides/evaluation/comparison/pairwise_string/": { |
| 176 | + canonical: |
| 177 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 178 | + alternative: ["/v0.1/docs/guides/evaluation/comparison/pairwise_string/"], |
| 179 | + }, |
| 180 | + "/docs/guides/evaluation/examples/": { |
| 181 | + canonical: |
| 182 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 183 | + alternative: ["/v0.1/docs/guides/evaluation/examples/"], |
| 184 | + }, |
| 185 | + "/docs/guides/evaluation/examples/comparisons/": { |
| 186 | + canonical: |
| 187 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 188 | + alternative: ["/v0.1/docs/guides/evaluation/examples/comparisons/"], |
| 189 | + }, |
| 190 | + "/docs/guides/evaluation/string/": { |
| 191 | + canonical: |
| 192 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 193 | + alternative: ["/v0.1/docs/guides/evaluation/string/"], |
| 194 | + }, |
| 195 | + "/docs/guides/evaluation/string/criteria/": { |
| 196 | + canonical: |
| 197 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 198 | + alternative: ["/v0.1/docs/guides/evaluation/string/criteria/"], |
| 199 | + }, |
| 200 | + "/docs/guides/evaluation/string/embedding_distance/": { |
| 201 | + canonical: |
| 202 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 203 | + alternative: ["/v0.1/docs/guides/evaluation/string/embedding_distance/"], |
| 204 | + }, |
| 205 | + "/docs/guides/evaluation/trajectory/": { |
| 206 | + canonical: |
| 207 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 208 | + alternative: ["/v0.1/docs/guides/evaluation/trajectory/"], |
| 209 | + }, |
| 210 | + "/docs/guides/evaluation/trajectory/trajectory_eval/": { |
| 211 | + canonical: |
| 212 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 213 | + alternative: ["/v0.1/docs/guides/evaluation/trajectory/trajectory_eval/"], |
| 214 | + }, |
| 215 | + "/docs/guides/extending_langchain/": { |
| 216 | + canonical: "/docs/how_to/#custom", |
| 217 | + alternative: ["/v0.1/docs/guides/extending_langchain/"], |
| 218 | + }, |
| 219 | + "/docs/guides/fallbacks/": { |
| 220 | + canonical: "/docs/how_to/fallbacks", |
| 221 | + alternative: ["/v0.1/docs/guides/fallbacks/"], |
| 222 | + }, |
| 223 | + "/docs/guides/langsmith_evaluation/": { |
| 224 | + canonical: |
| 225 | + "https://docs.smith.langchain.com/tutorials/Developers/evaluation", |
| 226 | + alternative: ["/v0.1/docs/guides/langsmith_evaluation/"], |
| 227 | + }, |
| 228 | + "/docs/guides/migrating/": { |
| 229 | + canonical: "https://js.langchain.com/v0.1/docs/guides/migrating/", |
| 230 | + alternative: ["/v0.1/docs/guides/migrating/"], |
| 231 | + }, |
| 232 | + "/docs/integrations/chat_memory/": { |
| 233 | + canonical: "/docs/integrations/memory", |
| 234 | + alternative: ["/v0.1/docs/integrations/chat_memory/"], |
| 235 | + }, |
| 236 | + "/docs/integrations/chat_memory/astradb/": { |
| 237 | + canonical: "/docs/integrations/memory/astradb", |
| 238 | + alternative: ["/v0.1/docs/integrations/chat_memory/astradb/"], |
| 239 | + }, |
| 240 | + "/docs/integrations/chat_memory/cassandra/": { |
| 241 | + canonical: "/docs/integrations/memory/cassandra", |
| 242 | + alternative: ["/v0.1/docs/integrations/chat_memory/cassandra/"], |
| 243 | + }, |
| 244 | + "/docs/integrations/chat_memory/cloudflare_d1/": { |
| 245 | + canonical: "/docs/integrations/memory/cloudflare_d1", |
| 246 | + alternative: ["/v0.1/docs/integrations/chat_memory/cloudflare_d1/"], |
| 247 | + }, |
| 248 | + "/docs/integrations/chat_memory/convex/": { |
| 249 | + canonical: "/docs/integrations/memory/convex", |
| 250 | + alternative: ["/v0.1/docs/integrations/chat_memory/convex/"], |
| 251 | + }, |
| 252 | + "/docs/integrations/chat_memory/dynamodb/": { |
| 253 | + canonical: "/docs/integrations/memory/dynamodb", |
| 254 | + alternative: ["/v0.1/docs/integrations/chat_memory/dynamodb/"], |
| 255 | + }, |
| 256 | + "/docs/integrations/chat_memory/firestore/": { |
| 257 | + canonical: "/docs/integrations/memory/firestore", |
| 258 | + alternative: ["/v0.1/docs/integrations/chat_memory/firestore/"], |
| 259 | + }, |
| 260 | + "/docs/integrations/chat_memory/ipfs_datastore/": { |
| 261 | + canonical: "/docs/integrations/memory/ipfs_datastore", |
| 262 | + alternative: ["/v0.1/docs/integrations/chat_memory/ipfs_datastore/"], |
| 263 | + }, |
| 264 | + "/docs/integrations/chat_memory/momento/": { |
| 265 | + canonical: "/docs/integrations/memory/momento", |
| 266 | + alternative: ["/v0.1/docs/integrations/chat_memory/momento/"], |
| 267 | + }, |
| 268 | + "/docs/integrations/chat_memory/mongodb/": { |
| 269 | + canonical: "/docs/integrations/memory/mongodb", |
| 270 | + alternative: ["/v0.1/docs/integrations/chat_memory/mongodb/"], |
| 271 | + }, |
| 272 | + "/docs/integrations/chat_memory/motorhead_memory/": { |
| 273 | + canonical: "/docs/integrations/memory/motorhead_memory", |
| 274 | + alternative: ["/v0.1/docs/integrations/chat_memory/motorhead_memory/"], |
| 275 | + }, |
| 276 | + "/docs/integrations/chat_memory/planetscale/": { |
| 277 | + canonical: "/docs/integrations/memory/planetscale", |
| 278 | + alternative: ["/v0.1/docs/integrations/chat_memory/planetscale/"], |
| 279 | + }, |
| 280 | + "/docs/integrations/chat_memory/postgres/": { |
| 281 | + canonical: "/docs/integrations/memory/postgres", |
| 282 | + alternative: ["/v0.1/docs/integrations/chat_memory/postgres/"], |
| 283 | + }, |
| 284 | + "/docs/integrations/chat_memory/redis/": { |
| 285 | + canonical: "/docs/integrations/memory/redis", |
| 286 | + alternative: ["/v0.1/docs/integrations/chat_memory/redis/"], |
| 287 | + }, |
| 288 | + "/docs/integrations/chat_memory/upstash_redis/": { |
| 289 | + canonical: "/docs/integrations/memory/upstash_redis", |
| 290 | + alternative: ["/v0.1/docs/integrations/chat_memory/upstash_redis/"], |
| 291 | + }, |
| 292 | + "/docs/integrations/chat_memory/xata/": { |
| 293 | + canonical: "/docs/integrations/memory/xata", |
| 294 | + alternative: ["/v0.1/docs/integrations/chat_memory/xata/"], |
| 295 | + }, |
| 296 | + "/docs/integrations/chat_memory/zep_memory/": { |
| 297 | + canonical: "/docs/integrations/memory/zep_memory", |
| 298 | + alternative: ["/v0.1/docs/integrations/chat_memory/zep_memory/"], |
| 299 | + }, |
| 300 | + "/docs/integrations/document_compressors/": { |
| 301 | + canonical: "/docs/integrations/document_transformers", |
| 302 | + alternative: ["/v0.1/docs/integrations/document_compressors/"], |
| 303 | + }, |
| 304 | + "/docs/integrations/llms/togetherai/": { |
| 305 | + canonical: "/docs/integrations/llms/together", |
| 306 | + alternative: ["/v0.1/docs/integrations/llms/togetherai/"], |
| 307 | + }, |
| 308 | + "/docs/integrations/retrievers/vectorstore/": { |
| 309 | + canonical: "/docs/how_to/vectorstore_retriever", |
| 310 | + alternative: ["/v0.1/docs/integrations/retrievers/vectorstore/"], |
| 311 | + }, |
| 312 | + "/docs/integrations/vectorstores/azure_cosmosdb/": { |
| 313 | + canonical: "/docs/integrations/vectorstores/azure_cosmosdb_mongodb", |
| 314 | + alternative: ["/v0.1/docs/integrations/vectorstores/azure_cosmosdb/"], |
| 315 | + }, |
| 316 | + "/docs/langgraph/": { |
| 317 | + canonical: "https://langchain-ai.github.io/langgraphjs/", |
| 318 | + alternative: ["/v0.1/docs/langgraph/"], |
| 319 | + }, |
| 320 | + "/docs/modules/agents/agent_types/chat_conversation_agent/": { |
| 321 | + canonical: "/docs/how_to/migrate_agent", |
| 322 | + alternative: [ |
| 323 | + "/v0.1/docs/modules/agents/agent_types/chat_conversation_agent/", |
| 324 | + ], |
| 325 | + }, |
| 326 | + "/docs/modules/agents/agent_types/openai_assistant/": { |
| 327 | + canonical: "/docs/how_to/migrate_agent", |
| 328 | + alternative: ["/v0.1/docs/modules/agents/agent_types/openai_assistant/"], |
| 329 | + }, |
| 330 | + "/docs/modules/agents/agent_types/openai_functions_agent/": { |
| 331 | + canonical: "/docs/how_to/migrate_agent", |
| 332 | + alternative: [ |
| 333 | + "/v0.1/docs/modules/agents/agent_types/openai_functions_agent/", |
| 334 | + ], |
| 335 | + }, |
| 336 | + "/docs/modules/agents/agent_types/openai_tools_agent/": { |
| 337 | + canonical: "/docs/how_to/migrate_agent", |
| 338 | + alternative: ["/v0.1/docs/modules/agents/agent_types/openai_tools_agent/"], |
| 339 | + }, |
| 340 | + "/docs/modules/agents/agent_types/plan_and_execute/": { |
| 341 | + canonical: "/docs/how_to/migrate_agent", |
| 342 | + alternative: ["/v0.1/docs/modules/agents/agent_types/plan_and_execute/"], |
| 343 | + }, |
| 344 | + "/docs/modules/agents/agent_types/react/": { |
| 345 | + canonical: "/docs/how_to/migrate_agent", |
| 346 | + alternative: ["/v0.1/docs/modules/agents/agent_types/react/"], |
| 347 | + }, |
| 348 | + "/docs/modules/agents/agent_types/structured_chat/": { |
| 349 | + canonical: "/docs/how_to/migrate_agent", |
| 350 | + alternative: ["/v0.1/docs/modules/agents/agent_types/structured_chat/"], |
| 351 | + }, |
| 352 | + "/docs/modules/agents/agent_types/tool_calling/": { |
| 353 | + canonical: "/docs/how_to/migrate_agent", |
| 354 | + alternative: ["/v0.1/docs/modules/agents/agent_types/tool_calling/"], |
| 355 | + }, |
| 356 | + "/docs/modules/agents/agent_types/xml_legacy/": { |
| 357 | + canonical: "/docs/how_to/migrate_agent", |
| 358 | + alternative: ["/v0.1/docs/modules/agents/agent_types/xml_legacy/"], |
| 359 | + }, |
| 360 | + "/docs/modules/agents/agent_types/xml/": { |
| 361 | + canonical: "/docs/how_to/migrate_agent", |
| 362 | + alternative: ["/v0.1/docs/modules/agents/agent_types/xml/"], |
| 363 | + }, |
| 364 | + "/docs/modules/agents/how_to/callbacks/": { |
| 365 | + canonical: "/docs/how_to/#callbacks", |
| 366 | + alternative: ["/v0.1/docs/modules/agents/how_to/callbacks/"], |
| 367 | + }, |
| 368 | + "/docs/modules/agents/how_to/cancelling_requests/": { |
| 369 | + canonical: "/docs/how_to/cancel_execution", |
| 370 | + alternative: ["/v0.1/docs/modules/agents/how_to/cancelling_requests/"], |
| 371 | + }, |
| 372 | + "/docs/modules/agents/how_to/custom_agent/": { |
| 373 | + canonical: |
| 374 | + "https://langchain-ai.github.io/langgraphjs/tutorials/quickstart/", |
| 375 | + alternative: ["/v0.1/docs/modules/agents/how_to/custom_agent/"], |
| 376 | + }, |
| 377 | + "/docs/modules/agents/how_to/custom_llm_agent/": { |
| 378 | + canonical: |
| 379 | + "https://langchain-ai.github.io/langgraphjs/tutorials/quickstart/", |
| 380 | + alternative: ["/v0.1/docs/modules/agents/how_to/custom_llm_agent/"], |
| 381 | + }, |
| 382 | + "/docs/modules/agents/how_to/custom_llm_chat_agent/": { |
| 383 | + canonical: |
| 384 | + "https://langchain-ai.github.io/langgraphjs/tutorials/quickstart/", |
| 385 | + alternative: ["/v0.1/docs/modules/agents/how_to/custom_llm_chat_agent/"], |
| 386 | + }, |
| 387 | + "/docs/modules/agents/how_to/custom_mrkl_agent/": { |
| 388 | + canonical: |
| 389 | + "https://langchain-ai.github.io/langgraphjs/tutorials/quickstart/", |
| 390 | + alternative: ["/v0.1/docs/modules/agents/how_to/custom_mrkl_agent/"], |
| 391 | + }, |
| 392 | + "/docs/modules/agents/how_to/handle_parsing_errors/": { |
| 393 | + canonical: |
| 394 | + "https://langchain-ai.github.io/langgraphjs/how-tos/tool-calling-errors/", |
| 395 | + alternative: ["/v0.1/docs/modules/agents/how_to/handle_parsing_errors/"], |
| 396 | + }, |
| 397 | + "/docs/modules/agents/how_to/intermediate_steps/": { |
| 398 | + canonical: |
| 399 | + "https://langchain-ai.github.io/langgraphjs/how-tos/stream-values/", |
| 400 | + alternative: ["/v0.1/docs/modules/agents/how_to/intermediate_steps/"], |
| 401 | + }, |
| 402 | + "/docs/modules/agents/how_to/logging_and_tracing/": { |
| 403 | + canonical: |
| 404 | + "https://docs.smith.langchain.com/how_to_guides/tracing/trace_with_langgraph", |
| 405 | + alternative: ["/v0.1/docs/modules/agents/how_to/logging_and_tracing/"], |
| 406 | + }, |
| 407 | + "/docs/modules/agents/how_to/timeouts/": { |
| 408 | + canonical: "/docs/how_to/cancel_execution/", |
| 409 | + alternative: ["/v0.1/docs/modules/agents/how_to/timeouts/"], |
| 410 | + }, |
| 411 | + "/docs/modules/agents/tools/": { |
| 412 | + canonical: |
| 413 | + "https://langchain-ai.github.io/langgraphjs/how-tos/tool-calling/", |
| 414 | + alternative: ["/v0.1/docs/modules/agents/tools/"], |
| 415 | + }, |
| 416 | + "/docs/modules/agents/tools/dynamic/": { |
| 417 | + canonical: "/docs/how_to/custom_tools/", |
| 418 | + alternative: ["/v0.1/docs/modules/agents/tools/dynamic/"], |
| 419 | + }, |
| 420 | + "/docs/modules/agents/tools/how_to/agents_with_vectorstores/": { |
| 421 | + canonical: "/docs/how_to/custom_tools", |
| 422 | + alternative: [ |
| 423 | + "/v0.1/docs/modules/agents/tools/how_to/agents_with_vectorstores/", |
| 424 | + ], |
| 425 | + }, |
| 426 | + "/docs/modules/agents/tools/toolkits/": { |
| 427 | + canonical: "/docs/how_to/tools_builtin", |
| 428 | + alternative: ["/v0.1/docs/modules/agents/tools/toolkits/"], |
| 429 | + }, |
| 430 | + "/docs/modules/callbacks/how_to/background_callbacks/": { |
| 431 | + canonical: "/docs/how_to/callbacks_backgrounding", |
| 432 | + alternative: ["/v0.1/docs/modules/callbacks/how_to/background_callbacks/"], |
| 433 | + }, |
| 434 | + "/docs/modules/callbacks/how_to/create_handlers/": { |
| 435 | + canonical: "/docs/how_to/custom_callbacks", |
| 436 | + alternative: ["/v0.1/docs/modules/callbacks/how_to/create_handlers/"], |
| 437 | + }, |
| 438 | + "/docs/modules/callbacks/how_to/creating_subclasses/": { |
| 439 | + canonical: "/docs/how_to/custom_callbacks", |
| 440 | + alternative: ["/v0.1/docs/modules/callbacks/how_to/creating_subclasses/"], |
| 441 | + }, |
| 442 | + "/docs/modules/callbacks/how_to/tags/": { |
| 443 | + canonical: "/docs/how_to/#callbacks", |
| 444 | + alternative: ["/v0.1/docs/modules/callbacks/how_to/tags/"], |
| 445 | + }, |
| 446 | + "/docs/modules/callbacks/how_to/with_listeners/": { |
| 447 | + canonical: "/docs/how_to/#callbacks", |
| 448 | + alternative: ["/v0.1/docs/modules/callbacks/how_to/with_listeners/"], |
| 449 | + }, |
| 450 | + "/docs/modules/chains/additional/analyze_document/": { |
| 451 | + canonical: |
| 452 | + "https://js.langchain.com/v0.1/docs/modules/chains/additional/analyze_document/", |
| 453 | + alternative: ["/v0.1/docs/modules/chains/additional/analyze_document/"], |
| 454 | + }, |
| 455 | + "/docs/modules/chains/additional/constitutional_chain/": { |
| 456 | + canonical: |
| 457 | + "https://js.langchain.com/v0.1/docs/modules/chains/additional/constitutional_chain/", |
| 458 | + alternative: ["/v0.1/docs/modules/chains/additional/constitutional_chain/"], |
| 459 | + }, |
| 460 | + "/docs/modules/chains/additional/cypher_chain/": { |
| 461 | + canonical: "/docs/tutorials/graph", |
| 462 | + alternative: ["/v0.1/docs/modules/chains/additional/cypher_chain/"], |
| 463 | + }, |
| 464 | + "/docs/modules/chains/additional/moderation/": { |
| 465 | + canonical: |
| 466 | + "https://js.langchain.com/v0.1/docs/modules/chains/additional/moderation/", |
| 467 | + alternative: ["/v0.1/docs/modules/chains/additional/moderation/"], |
| 468 | + }, |
| 469 | + "/docs/modules/chains/additional/multi_prompt_router/": { |
| 470 | + canonical: |
| 471 | + "https://js.langchain.com/v0.1/docs/modules/chains/additional/multi_prompt_router/", |
| 472 | + alternative: ["/v0.1/docs/modules/chains/additional/multi_prompt_router/"], |
| 473 | + }, |
| 474 | + "/docs/modules/chains/additional/multi_retrieval_qa_router/": { |
| 475 | + canonical: "/docs/how_to/multiple_queries", |
| 476 | + alternative: [ |
| 477 | + "/v0.1/docs/modules/chains/additional/multi_retrieval_qa_router/", |
| 478 | + ], |
| 479 | + }, |
| 480 | + "/docs/modules/chains/additional/openai_functions/": { |
| 481 | + canonical: "/docs/how_to/tool_calling", |
| 482 | + alternative: ["/v0.1/docs/modules/chains/additional/openai_functions/"], |
| 483 | + }, |
| 484 | + "/docs/modules/chains/additional/openai_functions/extraction/": { |
| 485 | + canonical: "/docs/tutorials/extraction", |
| 486 | + alternative: [ |
| 487 | + "/v0.1/docs/modules/chains/additional/openai_functions/extraction/", |
| 488 | + ], |
| 489 | + }, |
| 490 | + "/docs/modules/chains/additional/openai_functions/openapi/": { |
| 491 | + canonical: |
| 492 | + "https://js.langchain.com/v0.1/docs/modules/chains/additional/openai_functions/openapi/", |
| 493 | + alternative: [ |
| 494 | + "/v0.1/docs/modules/chains/additional/openai_functions/openapi/", |
| 495 | + ], |
| 496 | + }, |
| 497 | + "/docs/modules/chains/additional/openai_functions/tagging/": { |
| 498 | + canonical: "/docs/tutorials/extraction", |
| 499 | + alternative: [ |
| 500 | + "/v0.1/docs/modules/chains/additional/openai_functions/tagging/", |
| 501 | + ], |
| 502 | + }, |
| 503 | + "/docs/modules/chains/document/": { |
| 504 | + canonical: |
| 505 | + "https://api.js.langchain.com/functions/langchain.chains_combine_documents.createStuffDocumentsChain.html", |
| 506 | + alternative: ["/v0.1/docs/modules/chains/document/"], |
| 507 | + }, |
| 508 | + "/docs/modules/chains/document/map_reduce/": { |
| 509 | + canonical: |
| 510 | + "https://js.langchain.com/v0.1/docs/modules/chains/document/map_reduce/", |
| 511 | + alternative: ["/v0.1/docs/modules/chains/document/map_reduce/"], |
| 512 | + }, |
| 513 | + "/docs/modules/chains/document/refine/": { |
| 514 | + canonical: |
| 515 | + "https://js.langchain.com/v0.1/docs/modules/chains/document/refine/", |
| 516 | + alternative: ["/v0.1/docs/modules/chains/document/refine/"], |
| 517 | + }, |
| 518 | + "/docs/modules/chains/document/stuff/": { |
| 519 | + canonical: |
| 520 | + "https://js.langchain.com/v0.1/docs/modules/chains/document/stuff/", |
| 521 | + alternative: ["/v0.1/docs/modules/chains/document/stuff/"], |
| 522 | + }, |
| 523 | + "/docs/modules/chains/foundational/llm_chain/": { |
| 524 | + canonical: "/docs/tutorials/llm_chain", |
| 525 | + alternative: ["/v0.1/docs/modules/chains/foundational/llm_chain/"], |
| 526 | + }, |
| 527 | + "/docs/modules/chains/how_to/debugging/": { |
| 528 | + canonical: "/docs/how_to/debugging", |
| 529 | + alternative: ["/v0.1/docs/modules/chains/how_to/debugging/"], |
| 530 | + }, |
| 531 | + "/docs/modules/chains/how_to/memory/": { |
| 532 | + canonical: "/docs/how_to/qa_chat_history_how_to", |
| 533 | + alternative: ["/v0.1/docs/modules/chains/how_to/memory/"], |
| 534 | + }, |
| 535 | + "/docs/modules/chains/popular/api/": { |
| 536 | + canonical: "https://js.langchain.com/v0.1/docs/modules/chains/popular/api/", |
| 537 | + alternative: ["/v0.1/docs/modules/chains/popular/api/"], |
| 538 | + }, |
| 539 | + "/docs/modules/chains/popular/chat_vector_db_legacy/": { |
| 540 | + canonical: "/docs/tutorials/rag", |
| 541 | + alternative: ["/v0.1/docs/modules/chains/popular/chat_vector_db_legacy/"], |
| 542 | + }, |
| 543 | + "/docs/modules/chains/popular/chat_vector_db/": { |
| 544 | + canonical: "/docs/tutorials/rag", |
| 545 | + alternative: ["/v0.1/docs/modules/chains/popular/chat_vector_db/"], |
| 546 | + }, |
| 547 | + "/docs/modules/chains/popular/sqlite_legacy/": { |
| 548 | + canonical: "/docs/tutorials/sql_qa", |
| 549 | + alternative: ["/v0.1/docs/modules/chains/popular/sqlite_legacy/"], |
| 550 | + }, |
| 551 | + "/docs/modules/chains/popular/sqlite/": { |
| 552 | + canonical: "/docs/tutorials/sql_qa", |
| 553 | + alternative: ["/v0.1/docs/modules/chains/popular/sqlite/"], |
| 554 | + }, |
| 555 | + "/docs/modules/chains/popular/structured_output/": { |
| 556 | + canonical: "/docs/how_to/structured_output", |
| 557 | + alternative: ["/v0.1/docs/modules/chains/popular/structured_output/"], |
| 558 | + }, |
| 559 | + "/docs/modules/chains/popular/summarize/": { |
| 560 | + canonical: "/docs/tutorials/summarization", |
| 561 | + alternative: ["/v0.1/docs/modules/chains/popular/summarize/"], |
| 562 | + }, |
| 563 | + "/docs/modules/chains/popular/vector_db_qa_legacy/": { |
| 564 | + canonical: "/docs/tutorials/rag", |
| 565 | + alternative: ["/v0.1/docs/modules/chains/popular/vector_db_qa_legacy/"], |
| 566 | + }, |
| 567 | + "/docs/modules/chains/popular/vector_db_qa/": { |
| 568 | + canonical: "/docs/tutorials/rag", |
| 569 | + alternative: ["/v0.1/docs/modules/chains/popular/vector_db_qa/"], |
| 570 | + }, |
| 571 | + "/docs/modules/data_connection/document_loaders/creating_documents/": { |
| 572 | + canonical: "/docs/concepts#document", |
| 573 | + alternative: [ |
| 574 | + "/v0.1/docs/modules/data_connection/document_loaders/creating_documents/", |
| 575 | + ], |
| 576 | + }, |
| 577 | + "/docs/modules/data_connection/document_transformers/contextual_chunk_headers/": |
| 578 | + { |
| 579 | + canonical: |
| 580 | + "/docs/how_to/parent_document_retriever/#with-contextual-chunk-headers", |
| 581 | + alternative: [ |
| 582 | + "/v0.1/docs/modules/data_connection/document_transformers/contextual_chunk_headers/", |
| 583 | + ], |
| 584 | + }, |
| 585 | + "/docs/modules/data_connection/document_transformers/custom_text_splitter/": { |
| 586 | + canonical: "/docs/how_to/#text-splitters", |
| 587 | + alternative: [ |
| 588 | + "/v0.1/docs/modules/data_connection/document_transformers/custom_text_splitter/", |
| 589 | + ], |
| 590 | + }, |
| 591 | + "/docs/modules/data_connection/document_transformers/token_splitter/": { |
| 592 | + canonical: "/docs/how_to/split_by_token", |
| 593 | + alternative: [ |
| 594 | + "/v0.1/docs/modules/data_connection/document_transformers/token_splitter/", |
| 595 | + ], |
| 596 | + }, |
| 597 | + "/docs/modules/data_connection/experimental/graph_databases/neo4j/": { |
| 598 | + canonical: "/docs/tutorials/graph", |
| 599 | + alternative: [ |
| 600 | + "/v0.1/docs/modules/data_connection/experimental/graph_databases/neo4j/", |
| 601 | + ], |
| 602 | + }, |
| 603 | + "/docs/modules/data_connection/experimental/multimodal_embeddings/google_vertex_ai/": |
| 604 | + { |
| 605 | + canonical: |
| 606 | + "https://js.langchain.com/v0.1/docs/modules/data_connection/experimental/multimodal_embeddings/google_vertex_ai/", |
| 607 | + alternative: [ |
| 608 | + "/v0.1/docs/modules/data_connection/experimental/multimodal_embeddings/google_vertex_ai/", |
| 609 | + ], |
| 610 | + }, |
| 611 | + "/docs/modules/data_connection/retrievers/custom/": { |
| 612 | + canonical: "/docs/how_to/custom_retriever", |
| 613 | + alternative: ["/v0.1/docs/modules/data_connection/retrievers/custom/"], |
| 614 | + }, |
| 615 | + "/docs/modules/data_connection/retrievers/matryoshka_retriever/": { |
| 616 | + canonical: "/docs/how_to/reduce_retrieval_latency", |
| 617 | + alternative: [ |
| 618 | + "/v0.1/docs/modules/data_connection/retrievers/matryoshka_retriever/", |
| 619 | + ], |
| 620 | + }, |
| 621 | + "/docs/modules/data_connection/retrievers/multi-query-retriever/": { |
| 622 | + canonical: "/docs/how_to/multiple_queries", |
| 623 | + alternative: [ |
| 624 | + "/v0.1/docs/modules/data_connection/retrievers/multi-query-retriever/", |
| 625 | + ], |
| 626 | + }, |
| 627 | + "/docs/modules/data_connection/retrievers/multi-vector-retriever/": { |
| 628 | + canonical: "/docs/how_to/multi_vector", |
| 629 | + alternative: [ |
| 630 | + "/v0.1/docs/modules/data_connection/retrievers/multi-vector-retriever/", |
| 631 | + ], |
| 632 | + }, |
| 633 | + "/docs/modules/data_connection/retrievers/parent-document-retriever/": { |
| 634 | + canonical: "/docs/how_to/parent_document_retriever", |
| 635 | + alternative: [ |
| 636 | + "/v0.1/docs/modules/data_connection/retrievers/parent-document-retriever/", |
| 637 | + ], |
| 638 | + }, |
| 639 | + "/docs/modules/data_connection/retrievers/self_query/chroma-self-query/": { |
| 640 | + canonical: "/docs/integrations/retrievers/self_query/chroma", |
| 641 | + alternative: [ |
| 642 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/chroma-self-query/", |
| 643 | + ], |
| 644 | + }, |
| 645 | + "/docs/modules/data_connection/retrievers/self_query/hnswlib-self-query/": { |
| 646 | + canonical: "/docs/integrations/retrievers/self_query/hnswlib", |
| 647 | + alternative: [ |
| 648 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/hnswlib-self-query/", |
| 649 | + ], |
| 650 | + }, |
| 651 | + "/docs/modules/data_connection/retrievers/self_query/memory-self-query/": { |
| 652 | + canonical: "/docs/integrations/retrievers/self_query/memory", |
| 653 | + alternative: [ |
| 654 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/memory-self-query/", |
| 655 | + ], |
| 656 | + }, |
| 657 | + "/docs/modules/data_connection/retrievers/self_query/pinecone-self-query/": { |
| 658 | + canonical: "/docs/integrations/retrievers/self_query/pinecone", |
| 659 | + alternative: [ |
| 660 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/pinecone-self-query/", |
| 661 | + ], |
| 662 | + }, |
| 663 | + "/docs/modules/data_connection/retrievers/self_query/qdrant-self-query/": { |
| 664 | + canonical: "/docs/integrations/retrievers/self_query/qdrant", |
| 665 | + alternative: [ |
| 666 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/qdrant-self-query/", |
| 667 | + ], |
| 668 | + }, |
| 669 | + "/docs/modules/data_connection/retrievers/self_query/supabase-self-query/": { |
| 670 | + canonical: "/docs/integrations/retrievers/self_query/supabase", |
| 671 | + alternative: [ |
| 672 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/supabase-self-query/", |
| 673 | + ], |
| 674 | + }, |
| 675 | + "/docs/modules/data_connection/retrievers/self_query/vectara-self-query/": { |
| 676 | + canonical: "/docs/integrations/retrievers/self_query/vectara", |
| 677 | + alternative: [ |
| 678 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/vectara-self-query/", |
| 679 | + ], |
| 680 | + }, |
| 681 | + "/docs/modules/data_connection/retrievers/self_query/weaviate-self-query/": { |
| 682 | + canonical: "/docs/integrations/retrievers/self_query/weaviate", |
| 683 | + alternative: [ |
| 684 | + "/v0.1/docs/modules/data_connection/retrievers/self_query/weaviate-self-query/", |
| 685 | + ], |
| 686 | + }, |
| 687 | + "/docs/modules/data_connection/retrievers/similarity-score-threshold-retriever/": |
| 688 | + { |
| 689 | + canonical: |
| 690 | + "https://api.js.langchain.com/classes/langchain.retrievers_score_threshold.ScoreThresholdRetriever.html", |
| 691 | + alternative: [ |
| 692 | + "/v0.1/docs/modules/data_connection/retrievers/similarity-score-threshold-retriever/", |
| 693 | + ], |
| 694 | + }, |
| 695 | + "/docs/modules/data_connection/text_embedding/api_errors/": { |
| 696 | + canonical: |
| 697 | + "https://js.langchain.com/v0.1/docs/modules/data_connection/text_embedding/api_errors/", |
| 698 | + alternative: [ |
| 699 | + "/v0.1/docs/modules/data_connection/text_embedding/api_errors/", |
| 700 | + ], |
| 701 | + }, |
| 702 | + "/docs/modules/data_connection/text_embedding/caching_embeddings/": { |
| 703 | + canonical: "/docs/how_to/caching_embeddings", |
| 704 | + alternative: [ |
| 705 | + "/v0.1/docs/modules/data_connection/text_embedding/caching_embeddings/", |
| 706 | + ], |
| 707 | + }, |
| 708 | + "/docs/modules/data_connection/text_embedding/rate_limits/": { |
| 709 | + canonical: |
| 710 | + "https://js.langchain.com/v0.1/docs/modules/data_connection/text_embedding/rate_limits/", |
| 711 | + alternative: [ |
| 712 | + "/v0.1/docs/modules/data_connection/text_embedding/rate_limits/", |
| 713 | + ], |
| 714 | + }, |
| 715 | + "/docs/modules/data_connection/text_embedding/timeouts/": { |
| 716 | + canonical: |
| 717 | + "https://js.langchain.com/v0.1/docs/modules/data_connection/text_embedding/timeouts/", |
| 718 | + alternative: [ |
| 719 | + "/v0.1/docs/modules/data_connection/text_embedding/timeouts/", |
| 720 | + ], |
| 721 | + }, |
| 722 | + "/docs/modules/data_connection/vectorstores/custom/": { |
| 723 | + canonical: |
| 724 | + "https://js.langchain.com/v0.1/docs/modules/data_connection/vectorstores/custom/", |
| 725 | + alternative: ["/v0.1/docs/modules/data_connection/vectorstores/custom/"], |
| 726 | + }, |
| 727 | + "/docs/modules/experimental/": { |
| 728 | + canonical: "https://js.langchain.com/v0.1/docs/modules/experimental/", |
| 729 | + alternative: ["/v0.1/docs/modules/experimental/"], |
| 730 | + }, |
| 731 | + "/docs/modules/experimental/mask/": { |
| 732 | + canonical: |
| 733 | + "https://api.js.langchain.com/modules/langchain.experimental_masking.html", |
| 734 | + alternative: ["/v0.1/docs/modules/experimental/mask/"], |
| 735 | + }, |
| 736 | + "/docs/modules/experimental/prompts/custom_formats/": { |
| 737 | + canonical: |
| 738 | + "https://api.js.langchain.com/classes/langchain.experimental_prompts_handlebars.HandlebarsPromptTemplate.html", |
| 739 | + alternative: ["/v0.1/docs/modules/experimental/prompts/custom_formats/"], |
| 740 | + }, |
| 741 | + "/docs/modules/memory/chat_messages/custom/": { |
| 742 | + canonical: |
| 743 | + "https://js.langchain.com/v0.1/docs/modules/memory/chat_messages/custom/", |
| 744 | + alternative: ["/v0.1/docs/modules/memory/chat_messages/custom/"], |
| 745 | + }, |
| 746 | + "/docs/modules/memory/types/buffer_memory_chat/": { |
| 747 | + canonical: |
| 748 | + "https://api.js.langchain.com/classes/langchain.memory.BufferMemory.html", |
| 749 | + alternative: ["/v0.1/docs/modules/memory/types/buffer_memory_chat/"], |
| 750 | + }, |
| 751 | + "/docs/modules/memory/types/buffer_window/": { |
| 752 | + canonical: |
| 753 | + "https://api.js.langchain.com/classes/langchain.memory.BufferWindowMemory.html", |
| 754 | + alternative: ["/v0.1/docs/modules/memory/types/buffer_window/"], |
| 755 | + }, |
| 756 | + "/docs/modules/memory/types/entity_summary_memory/": { |
| 757 | + canonical: |
| 758 | + "https://api.js.langchain.com/classes/langchain.memory.EntityMemory.html", |
| 759 | + alternative: ["/v0.1/docs/modules/memory/types/entity_summary_memory/"], |
| 760 | + }, |
| 761 | + "/docs/modules/memory/types/multiple_memory/": { |
| 762 | + canonical: |
| 763 | + "https://api.js.langchain.com/classes/langchain.memory.CombinedMemory.html", |
| 764 | + alternative: ["/v0.1/docs/modules/memory/types/multiple_memory/"], |
| 765 | + }, |
| 766 | + "/docs/modules/memory/types/summary_buffer/": { |
| 767 | + canonical: |
| 768 | + "https://api.js.langchain.com/classes/langchain.memory.ConversationSummaryBufferMemory.html", |
| 769 | + alternative: ["/v0.1/docs/modules/memory/types/summary_buffer/"], |
| 770 | + }, |
| 771 | + "/docs/modules/memory/types/summary/": { |
| 772 | + canonical: |
| 773 | + "https://api.js.langchain.com/classes/langchain.memory.ConversationSummaryMemory.html", |
| 774 | + alternative: ["/v0.1/docs/modules/memory/types/summary/"], |
| 775 | + }, |
| 776 | + "/docs/modules/memory/types/vectorstore_retriever_memory/": { |
| 777 | + canonical: |
| 778 | + "https://api.js.langchain.com/classes/langchain.memory.VectorStoreRetrieverMemory.html", |
| 779 | + alternative: [ |
| 780 | + "/v0.1/docs/modules/memory/types/vectorstore_retriever_memory/", |
| 781 | + ], |
| 782 | + }, |
| 783 | + "/docs/modules/model_io/chat/caching/": { |
| 784 | + canonical: "/docs/how_to/chat_model_caching", |
| 785 | + alternative: ["/v0.1/docs/modules/model_io/chat/caching/"], |
| 786 | + }, |
| 787 | + "/docs/modules/model_io/chat/cancelling_requests/": { |
| 788 | + canonical: "/docs/how_to/cancel_execution", |
| 789 | + alternative: ["/v0.1/docs/modules/model_io/chat/cancelling_requests/"], |
| 790 | + }, |
| 791 | + "/docs/modules/model_io/chat/custom_chat/": { |
| 792 | + canonical: "/docs/how_to/custom_chat", |
| 793 | + alternative: ["/v0.1/docs/modules/model_io/chat/custom_chat/"], |
| 794 | + }, |
| 795 | + "/docs/modules/model_io/chat/dealing_with_api_errors/": { |
| 796 | + canonical: "/docs/how_to/fallbacks", |
| 797 | + alternative: ["/v0.1/docs/modules/model_io/chat/dealing_with_api_errors/"], |
| 798 | + }, |
| 799 | + "/docs/modules/model_io/chat/dealing_with_rate_limits/": { |
| 800 | + canonical: "/docs/how_to/fallbacks", |
| 801 | + alternative: ["/v0.1/docs/modules/model_io/chat/dealing_with_rate_limits/"], |
| 802 | + }, |
| 803 | + "/docs/modules/model_io/chat/subscribing_events/": { |
| 804 | + canonical: "/docs/how_to/custom_callbacks", |
| 805 | + alternative: ["/v0.1/docs/modules/model_io/chat/subscribing_events/"], |
| 806 | + }, |
| 807 | + "/docs/modules/model_io/chat/timeouts/": { |
| 808 | + canonical: "/docs/how_to/custom_callbacks", |
| 809 | + alternative: ["/v0.1/docs/modules/model_io/chat/timeouts/"], |
| 810 | + }, |
| 811 | + "/docs/modules/model_io/llms/cancelling_requests/": { |
| 812 | + canonical: "/docs/how_to/cancel_execution", |
| 813 | + alternative: ["/v0.1/docs/modules/model_io/llms/cancelling_requests/"], |
| 814 | + }, |
| 815 | + "/docs/modules/model_io/llms/dealing_with_api_errors/": { |
| 816 | + canonical: "/docs/how_to/fallbacks", |
| 817 | + alternative: ["/v0.1/docs/modules/model_io/llms/dealing_with_api_errors/"], |
| 818 | + }, |
| 819 | + "/docs/modules/model_io/llms/dealing_with_rate_limits/": { |
| 820 | + canonical: "/docs/how_to/fallbacks", |
| 821 | + alternative: ["/v0.1/docs/modules/model_io/llms/dealing_with_rate_limits/"], |
| 822 | + }, |
| 823 | + "/docs/modules/model_io/llms/subscribing_events/": { |
| 824 | + canonical: "/docs/how_to/custom_callbacks", |
| 825 | + alternative: ["/v0.1/docs/modules/model_io/llms/subscribing_events/"], |
| 826 | + }, |
| 827 | + "/docs/modules/model_io/llms/timeouts/": { |
| 828 | + canonical: "/docs/how_to/cancel_execution", |
| 829 | + alternative: ["/v0.1/docs/modules/model_io/llms/timeouts/"], |
| 830 | + }, |
| 831 | + "/docs/modules/model_io/output_parsers/types/bytes/": { |
| 832 | + canonical: |
| 833 | + "https://api.js.langchain.com/modules/_langchain_core.output_parsers.html", |
| 834 | + alternative: ["/v0.1/docs/modules/model_io/output_parsers/types/bytes/"], |
| 835 | + }, |
| 836 | + "/docs/modules/model_io/output_parsers/types/combining_output_parser/": { |
| 837 | + canonical: |
| 838 | + "https://api.js.langchain.com/classes/langchain.output_parsers.CombiningOutputParser.html", |
| 839 | + alternative: [ |
| 840 | + "/v0.1/docs/modules/model_io/output_parsers/types/combining_output_parser/", |
| 841 | + ], |
| 842 | + }, |
| 843 | + "/docs/modules/model_io/output_parsers/types/csv/": { |
| 844 | + canonical: |
| 845 | + "https://api.js.langchain.com/classes/_langchain_core.output_parsers.CommaSeparatedListOutputParser.html", |
| 846 | + alternative: ["/v0.1/docs/modules/model_io/output_parsers/types/csv/"], |
| 847 | + }, |
| 848 | + "/docs/modules/model_io/output_parsers/types/custom_list_parser/": { |
| 849 | + canonical: |
| 850 | + "https://api.js.langchain.com/classes/_langchain_core.output_parsers.CustomListOutputParser.html", |
| 851 | + alternative: [ |
| 852 | + "/v0.1/docs/modules/model_io/output_parsers/types/custom_list_parser/", |
| 853 | + ], |
| 854 | + }, |
| 855 | + "/docs/modules/model_io/output_parsers/types/http_response/": { |
| 856 | + canonical: |
| 857 | + "https://api.js.langchain.com/classes/langchain.output_parsers.HttpResponseOutputParser.html", |
| 858 | + alternative: [ |
| 859 | + "/v0.1/docs/modules/model_io/output_parsers/types/http_response/", |
| 860 | + ], |
| 861 | + }, |
| 862 | + "/docs/modules/model_io/output_parsers/types/json_functions/": { |
| 863 | + canonical: |
| 864 | + "https://api.js.langchain.com/classes/langchain.output_parsers.JsonOutputFunctionsParser.html", |
| 865 | + alternative: [ |
| 866 | + "/v0.1/docs/modules/model_io/output_parsers/types/json_functions/", |
| 867 | + ], |
| 868 | + }, |
| 869 | + "/docs/modules/model_io/output_parsers/types/string/": { |
| 870 | + canonical: |
| 871 | + "https://api.js.langchain.com/classes/_langchain_core.output_parsers.StringOutputParser.html", |
| 872 | + alternative: ["/v0.1/docs/modules/model_io/output_parsers/types/string/"], |
| 873 | + }, |
| 874 | + "/docs/modules/model_io/prompts/example_selector_types/": { |
| 875 | + canonical: "/docs/how_to/#example-selectors", |
| 876 | + alternative: [ |
| 877 | + "/v0.1/docs/modules/model_io/prompts/example_selector_types/", |
| 878 | + ], |
| 879 | + }, |
| 880 | + "/docs/modules/model_io/prompts/example_selector_types/length_based/": { |
| 881 | + canonical: "/docs/how_to/example_selectors_length_based", |
| 882 | + alternative: [ |
| 883 | + "/v0.1/docs/modules/model_io/prompts/example_selector_types/length_based/", |
| 884 | + ], |
| 885 | + }, |
| 886 | + "/docs/modules/model_io/prompts/example_selector_types/similarity/": { |
| 887 | + canonical: "/docs/how_to/example_selectors_similarity", |
| 888 | + alternative: [ |
| 889 | + "/v0.1/docs/modules/model_io/prompts/example_selector_types/similarity/", |
| 890 | + ], |
| 891 | + }, |
| 892 | + "/docs/modules/model_io/prompts/few_shot/": { |
| 893 | + canonical: "/docs/how_to/few_shot_examples", |
| 894 | + alternative: ["/v0.1/docs/modules/model_io/prompts/few_shot/"], |
| 895 | + }, |
| 896 | + "/docs/modules/model_io/prompts/pipeline/": { |
| 897 | + canonical: "/docs/how_to/prompts_composition", |
| 898 | + alternative: ["/v0.1/docs/modules/model_io/prompts/pipeline/"], |
| 899 | + }, |
| 900 | + "/docs/production/deployment/": { |
| 901 | + canonical: "https://langchain-ai.github.io/langgraph/cloud/", |
| 902 | + alternative: ["/v0.1/docs/production/deployment/"], |
| 903 | + }, |
| 904 | + "/docs/production/tracing/": { |
| 905 | + canonical: |
| 906 | + "https://docs.smith.langchain.com/how_to_guides/tracing/trace_with_langchain", |
| 907 | + alternative: ["/v0.1/docs/production/tracing/"], |
| 908 | + }, |
| 909 | + "/docs/use_cases/agent_simulations/": { |
| 910 | + canonical: |
| 911 | + "https://js.langchain.com/v0.1/docs/use_cases/agent_simulations/", |
| 912 | + alternative: ["/v0.1/docs/use_cases/agent_simulations/"], |
| 913 | + }, |
| 914 | + "/docs/use_cases/agent_simulations/generative_agents/": { |
| 915 | + canonical: |
| 916 | + "https://js.langchain.com/v0.1/docs/use_cases/agent_simulations/generative_agents/", |
| 917 | + alternative: ["/v0.1/docs/use_cases/agent_simulations/generative_agents/"], |
| 918 | + }, |
| 919 | + "/docs/use_cases/agent_simulations/violation_of_expectations_chain/": { |
| 920 | + canonical: |
| 921 | + "https://js.langchain.com/v0.1/docs/use_cases/agent_simulations/violation_of_expectations_chain/", |
| 922 | + alternative: [ |
| 923 | + "/v0.1/docs/use_cases/agent_simulations/violation_of_expectations_chain/", |
| 924 | + ], |
| 925 | + }, |
| 926 | + "/docs/use_cases/api/": { |
| 927 | + canonical: "https://js.langchain.com/v0.1/docs/use_cases/api/", |
| 928 | + alternative: ["/v0.1/docs/use_cases/api/"], |
| 929 | + }, |
| 930 | + "/docs/use_cases/autonomous_agents/": { |
| 931 | + canonical: |
| 932 | + "https://js.langchain.com/v0.1/docs/use_cases/autonomous_agents/", |
| 933 | + alternative: ["/v0.1/docs/use_cases/autonomous_agents/"], |
| 934 | + }, |
| 935 | + "/docs/use_cases/autonomous_agents/auto_gpt/": { |
| 936 | + canonical: |
| 937 | + "https://js.langchain.com/v0.1/docs/use_cases/autonomous_agents/auto_gpt/", |
| 938 | + alternative: ["/v0.1/docs/use_cases/autonomous_agents/auto_gpt/"], |
| 939 | + }, |
| 940 | + "/docs/use_cases/autonomous_agents/baby_agi/": { |
| 941 | + canonical: |
| 942 | + "https://js.langchain.com/v0.1/docs/use_cases/autonomous_agents/baby_agi/", |
| 943 | + alternative: ["/v0.1/docs/use_cases/autonomous_agents/baby_agi/"], |
| 944 | + }, |
| 945 | + "/docs/use_cases/autonomous_agents/sales_gpt/": { |
| 946 | + canonical: |
| 947 | + "https://js.langchain.com/v0.1/docs/use_cases/autonomous_agents/sales_gpt/", |
| 948 | + alternative: ["/v0.1/docs/use_cases/autonomous_agents/sales_gpt/"], |
| 949 | + }, |
| 950 | + "/docs/use_cases/graph/construction/": { |
| 951 | + canonical: "/docs/tutorials/graph", |
| 952 | + alternative: ["/v0.1/docs/use_cases/graph/construction/"], |
| 953 | + }, |
| 954 | + "/docs/use_cases/media/": { |
| 955 | + canonical: "/docs/how_to/multimodal_prompts", |
| 956 | + alternative: ["/v0.1/docs/use_cases/media/"], |
| 957 | + }, |
| 958 | + "/docs/use_cases/query_analysis/how_to/constructing_filters/": { |
| 959 | + canonical: "/docs/tutorials/query_analysis", |
| 960 | + alternative: [ |
| 961 | + "/v0.1/docs/use_cases/query_analysis/how_to/constructing_filters/", |
| 962 | + ], |
| 963 | + }, |
| 964 | + "/docs/use_cases/tabular/": { |
| 965 | + canonical: "/docs/tutorials/sql_qa", |
| 966 | + alternative: ["/v0.1/docs/use_cases/tabular/"], |
| 967 | + }, |
| 968 | +}; |
| 969 | + |
| 970 | +export default function NotFound() { |
| 971 | + const location = useLocation(); |
| 972 | + const pathname = location.pathname.endsWith("/") |
| 973 | + ? location.pathname |
| 974 | + : `${location.pathname}/`; // Ensure the path matches the keys in suggestedLinks |
| 975 | + const { canonical, alternative } = suggestedLinks[pathname] || {}; |
| 976 | + |
| 977 | + return ( |
| 978 | + <> |
| 979 | + <PageMetadata |
| 980 | + title={translate({ |
| 981 | + id: "theme.NotFound.title", |
| 982 | + message: "Page Not Found", |
| 983 | + })} |
| 984 | + /> |
| 985 | + <Layout> |
| 986 | + <main className="container margin-vert--xl"> |
| 987 | + <div className="row"> |
| 988 | + <div className="col col--6 col--offset-3"> |
| 989 | + <h1 className="hero__title"> |
| 990 | + {canonical |
| 991 | + ? "Page Moved" |
| 992 | + : alternative |
| 993 | + ? "Page Removed" |
| 994 | + : "Page Not Found"} |
| 995 | + </h1> |
| 996 | + {canonical ? ( |
| 997 | + <h3> |
| 998 | + You can find the new location <a href={canonical}>here</a>. |
| 999 | + </h3> |
| 1000 | + ) : alternative ? ( |
| 1001 | + <p>The page you were looking for has been removed.</p> |
| 1002 | + ) : ( |
| 1003 | + <p>We could not find what you were looking for.</p> |
| 1004 | + )} |
| 1005 | + {alternative && ( |
| 1006 | + <p> |
| 1007 | + <details> |
| 1008 | + <summary>Alternative pages</summary> |
| 1009 | + <ul> |
| 1010 | + {alternative.map((alt, index) => ( |
| 1011 | + // eslint-disable-next-line react/no-array-index-key |
| 1012 | + <li key={index}> |
| 1013 | + <a href={alt}>{alt}</a> |
| 1014 | + {alt.startsWith("/v0.1/") && ( |
| 1015 | + <> |
| 1016 | + {" "} |
| 1017 | + <LegacyBadge /> |
| 1018 | + </> |
| 1019 | + )} |
| 1020 | + </li> |
| 1021 | + ))} |
| 1022 | + </ul> |
| 1023 | + </details> |
| 1024 | + </p> |
| 1025 | + )} |
| 1026 | + <p> |
| 1027 | + Please contact the owner of the site that linked you to the |
| 1028 | + original URL and let them know their link{" "} |
| 1029 | + {canonical |
| 1030 | + ? "has moved." |
| 1031 | + : alternative |
| 1032 | + ? "has been removed." |
| 1033 | + : "is broken."} |
| 1034 | + </p> |
| 1035 | + </div> |
| 1036 | + </div> |
| 1037 | + </main> |
| 1038 | + </Layout> |
| 1039 | + </> |
| 1040 | + ); |
| 1041 | +} |
0 commit comments