2023-06-16 18:52:56 +00:00
|
|
|
/* eslint-disable global-require,import/no-extraneous-dependencies */
|
|
|
|
|
|
|
|
// @ts-check
|
|
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
|
|
const { ProvidePlugin } = require("webpack");
|
2024-03-11 21:23:12 +00:00
|
|
|
require("dotenv").config();
|
2023-06-16 18:52:56 +00:00
|
|
|
|
2023-06-30 02:21:11 +00:00
|
|
|
const baseLightCodeBlockTheme = require("prism-react-renderer/themes/vsLight");
|
|
|
|
const baseDarkCodeBlockTheme = require("prism-react-renderer/themes/vsDark");
|
2023-06-16 18:52:56 +00:00
|
|
|
|
2024-09-13 21:38:45 +00:00
|
|
|
const baseUrl = "/";
|
2024-05-10 13:49:59 +00:00
|
|
|
|
2023-06-16 18:52:56 +00:00
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
2024-04-05 02:36:33 +00:00
|
|
|
title: "🦜️🔗 LangChain",
|
2023-06-16 18:52:56 +00:00
|
|
|
tagline: "LangChain Python Docs",
|
2024-02-22 23:20:34 +00:00
|
|
|
favicon: "img/brand/favicon.png",
|
2023-06-16 18:52:56 +00:00
|
|
|
// Set the production url of your site here
|
|
|
|
url: "https://python.langchain.com",
|
|
|
|
// Set the /<baseUrl>/ pathname under which your site is served
|
|
|
|
// For GitHub pages deployment, it is often '/<projectName>/'
|
2024-05-10 13:49:59 +00:00
|
|
|
baseUrl: baseUrl,
|
2024-04-04 19:49:15 +00:00
|
|
|
trailingSlash: true,
|
2024-05-10 13:49:59 +00:00
|
|
|
onBrokenLinks: "throw",
|
|
|
|
onBrokenMarkdownLinks: "throw",
|
2023-06-16 18:52:56 +00:00
|
|
|
|
2023-12-01 19:06:29 +00:00
|
|
|
themes: ["@docusaurus/theme-mermaid"],
|
|
|
|
markdown: {
|
|
|
|
mermaid: true,
|
|
|
|
},
|
|
|
|
|
2023-06-16 18:52:56 +00:00
|
|
|
plugins: [
|
|
|
|
() => ({
|
|
|
|
name: "custom-webpack-config",
|
|
|
|
configureWebpack: () => ({
|
|
|
|
plugins: [
|
|
|
|
new ProvidePlugin({
|
|
|
|
process: require.resolve("process/browser"),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
fallback: {
|
|
|
|
path: false,
|
|
|
|
url: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.m?js/,
|
|
|
|
resolve: {
|
|
|
|
fullySpecified: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.py$/,
|
|
|
|
loader: "raw-loader",
|
|
|
|
resolve: {
|
|
|
|
fullySpecified: false,
|
|
|
|
},
|
|
|
|
},
|
2024-02-21 02:30:11 +00:00
|
|
|
{
|
|
|
|
test: /\.ya?ml$/,
|
|
|
|
use: 'yaml-loader'
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
{
|
|
|
|
test: /\.ipynb$/,
|
|
|
|
loader: "raw-loader",
|
|
|
|
resolve: {
|
2023-09-25 18:54:32 +00:00
|
|
|
fullySpecified: false,
|
|
|
|
},
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
|
|
|
|
presets: [
|
|
|
|
[
|
|
|
|
"classic",
|
|
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
|
|
({
|
|
|
|
docs: {
|
2024-05-24 19:44:46 +00:00
|
|
|
editUrl: "https://github.com/langchain-ai/langchain/edit/master/docs/",
|
2023-06-16 18:52:56 +00:00
|
|
|
sidebarPath: require.resolve("./sidebars.js"),
|
|
|
|
remarkPlugins: [
|
|
|
|
[require("@docusaurus/remark-plugin-npm2yarn"), { sync: true }],
|
|
|
|
],
|
|
|
|
async sidebarItemsGenerator({
|
|
|
|
defaultSidebarItemsGenerator,
|
|
|
|
...args
|
|
|
|
}) {
|
|
|
|
const sidebarItems = await defaultSidebarItemsGenerator(args);
|
|
|
|
sidebarItems.forEach((subItem) => {
|
|
|
|
// This allows breaking long sidebar labels into multiple lines
|
|
|
|
// by inserting a zero-width space after each slash.
|
|
|
|
if (
|
|
|
|
"label" in subItem &&
|
|
|
|
subItem.label &&
|
|
|
|
subItem.label.includes("/")
|
|
|
|
) {
|
|
|
|
// eslint-disable-next-line no-param-reassign
|
|
|
|
subItem.label = subItem.label.replace(/\//g, "/\u200B");
|
|
|
|
}
|
2024-05-09 00:23:52 +00:00
|
|
|
if (args.item.className) {
|
|
|
|
subItem.className = args.item.className;
|
|
|
|
}
|
2023-06-16 18:52:56 +00:00
|
|
|
});
|
|
|
|
return sidebarItems;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pages: {
|
|
|
|
remarkPlugins: [require("@docusaurus/remark-plugin-npm2yarn")],
|
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
customCss: require.resolve("./src/css/custom.css"),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
2024-05-08 19:29:59 +00:00
|
|
|
announcementBar: {
|
2024-09-06 21:28:08 +00:00
|
|
|
content:
|
|
|
|
'Share your thoughts on AI agents. <a target="_blank" href="https://langchain.typeform.com/state-of-agents">Take the 3-min survey</a>.',
|
2024-05-08 19:29:59 +00:00
|
|
|
isCloseable: true,
|
2024-09-06 21:28:08 +00:00
|
|
|
backgroundColor: "rgba(53, 151, 147, 0.1)",
|
|
|
|
textColor: "rgb(53, 151, 147)",
|
2024-05-08 19:29:59 +00:00
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
docs: {
|
|
|
|
sidebar: {
|
|
|
|
hideable: true,
|
2023-10-11 02:56:21 +00:00
|
|
|
autoCollapseCategories: true,
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
|
|
|
},
|
2023-08-08 16:54:18 +00:00
|
|
|
colorMode: {
|
|
|
|
disableSwitch: false,
|
|
|
|
respectPrefersColorScheme: true,
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
prism: {
|
2023-06-30 02:21:11 +00:00
|
|
|
theme: {
|
|
|
|
...baseLightCodeBlockTheme,
|
|
|
|
plain: {
|
|
|
|
...baseLightCodeBlockTheme.plain,
|
|
|
|
backgroundColor: "#F5F5F5",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
darkTheme: {
|
|
|
|
...baseDarkCodeBlockTheme,
|
|
|
|
plain: {
|
|
|
|
...baseDarkCodeBlockTheme.plain,
|
|
|
|
backgroundColor: "#222222",
|
|
|
|
},
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
2024-02-22 23:20:34 +00:00
|
|
|
image: "img/brand/theme-image.png",
|
2023-06-16 18:52:56 +00:00
|
|
|
navbar: {
|
2024-02-22 23:20:34 +00:00
|
|
|
logo: {src: "img/brand/wordmark.png", srcDark: "img/brand/wordmark-dark.png"},
|
2023-06-16 18:52:56 +00:00
|
|
|
items: [
|
2023-07-21 20:52:03 +00:00
|
|
|
{
|
2023-09-25 18:54:32 +00:00
|
|
|
type: "docSidebar",
|
|
|
|
position: "left",
|
|
|
|
sidebarId: "integrations",
|
|
|
|
label: "Integrations",
|
2023-07-21 20:52:03 +00:00
|
|
|
},
|
|
|
|
{
|
2024-08-14 14:00:17 +00:00
|
|
|
type: "dropdown",
|
|
|
|
label: "API reference",
|
2023-07-21 20:52:03 +00:00
|
|
|
position: "left",
|
2024-08-14 14:00:17 +00:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "Latest",
|
2024-09-13 21:38:45 +00:00
|
|
|
to: "https://python.langchain.com/api_reference/reference.html",
|
2024-08-14 14:00:17 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "Legacy",
|
|
|
|
href: "https://api.python.langchain.com/"
|
|
|
|
}
|
|
|
|
]
|
2023-07-21 20:52:03 +00:00
|
|
|
},
|
2023-09-28 19:44:52 +00:00
|
|
|
{
|
2023-10-24 19:28:08 +00:00
|
|
|
type: "dropdown",
|
|
|
|
label: "More",
|
2023-09-28 19:44:52 +00:00
|
|
|
position: "left",
|
2023-10-24 19:28:08 +00:00
|
|
|
items: [
|
2024-02-21 02:30:11 +00:00
|
|
|
{
|
2024-05-08 19:29:59 +00:00
|
|
|
type: "doc",
|
|
|
|
docId: "people",
|
2024-02-21 02:30:11 +00:00
|
|
|
label: "People",
|
|
|
|
},
|
2023-10-25 19:28:43 +00:00
|
|
|
{
|
2024-05-08 19:29:59 +00:00
|
|
|
type: "doc",
|
|
|
|
docId: "contributing/index",
|
2024-02-14 22:55:09 +00:00
|
|
|
label: "Contributing",
|
2023-10-25 19:28:43 +00:00
|
|
|
},
|
2023-11-15 03:49:17 +00:00
|
|
|
{
|
docs: add changelog (#15606)
<!-- Thank you for contributing to LangChain!
Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.
Replace this entire comment with:
- **Description:** a description of the change,
- **Issue:** the issue # it fixes if applicable,
- **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!
Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.
See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/
If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.
If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
-->
---------
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2024-01-07 16:34:34 +00:00
|
|
|
label: "Cookbooks",
|
|
|
|
href: "https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md"
|
2023-11-15 03:49:17 +00:00
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
2024-05-08 19:29:59 +00:00
|
|
|
type: "doc",
|
|
|
|
docId: "additional_resources/tutorials",
|
2024-05-16 16:56:32 +00:00
|
|
|
label: "3rd party tutorials"
|
2023-10-24 19:28:08 +00:00
|
|
|
},
|
|
|
|
{
|
2024-05-08 19:29:59 +00:00
|
|
|
type: "doc",
|
|
|
|
docId: "additional_resources/youtube",
|
2024-02-06 00:12:56 +00:00
|
|
|
label: "YouTube"
|
2023-10-24 19:28:08 +00:00
|
|
|
},
|
2024-05-17 18:28:57 +00:00
|
|
|
{
|
|
|
|
to: "/docs/additional_resources/arxiv_references",
|
|
|
|
label: "arXiv"
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
]
|
2023-09-28 19:44:52 +00:00
|
|
|
},
|
2024-05-17 00:01:34 +00:00
|
|
|
{
|
|
|
|
type: "dropdown",
|
2024-09-13 21:38:45 +00:00
|
|
|
label: "v0.3",
|
2024-05-17 00:01:34 +00:00
|
|
|
position: "right",
|
|
|
|
items: [
|
|
|
|
{
|
2024-09-13 21:38:45 +00:00
|
|
|
label: "v0.3",
|
2024-05-17 00:01:34 +00:00
|
|
|
href: "/docs/introduction"
|
|
|
|
},
|
2024-09-13 21:38:45 +00:00
|
|
|
{
|
|
|
|
label: "v0.2",
|
|
|
|
href: "https://python.langchain.com/v0.2/docs/introduction"
|
|
|
|
},
|
2024-05-17 00:01:34 +00:00
|
|
|
{
|
|
|
|
label: "v0.1",
|
|
|
|
href: "https://python.langchain.com/v0.1/docs/get_started/introduction"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-09-28 19:44:52 +00:00
|
|
|
{
|
2023-10-24 19:28:08 +00:00
|
|
|
type: "dropdown",
|
2023-11-29 00:35:38 +00:00
|
|
|
label: "🦜️🔗",
|
2023-06-16 18:52:56 +00:00
|
|
|
position: "right",
|
2023-10-24 19:28:08 +00:00
|
|
|
items: [
|
|
|
|
{
|
|
|
|
href: "https://smith.langchain.com",
|
|
|
|
label: "LangSmith",
|
|
|
|
},
|
2023-11-29 00:44:45 +00:00
|
|
|
{
|
|
|
|
href: "https://docs.smith.langchain.com/",
|
|
|
|
label: "LangSmith Docs",
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
2023-11-06 15:07:25 +00:00
|
|
|
href: "https://smith.langchain.com/hub",
|
|
|
|
label: "LangChain Hub",
|
2023-10-24 19:28:08 +00:00
|
|
|
},
|
|
|
|
{
|
2023-11-06 15:07:25 +00:00
|
|
|
href: "https://js.langchain.com",
|
|
|
|
label: "JS/TS Docs",
|
2023-10-24 19:28:08 +00:00
|
|
|
},
|
|
|
|
]
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
2023-11-29 00:35:38 +00:00
|
|
|
{
|
|
|
|
href: "https://chat.langchain.com",
|
2024-03-09 02:00:21 +00:00
|
|
|
label: "💬",
|
2023-11-29 00:35:38 +00:00
|
|
|
position: "right",
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
// Please keep GitHub link to the right for consistency.
|
|
|
|
{
|
2023-10-01 19:30:58 +00:00
|
|
|
href: "https://github.com/langchain-ai/langchain",
|
2023-09-25 18:54:32 +00:00
|
|
|
position: "right",
|
|
|
|
className: "header-github-link",
|
|
|
|
"aria-label": "GitHub repository",
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
footer: {
|
|
|
|
style: "light",
|
|
|
|
links: [
|
|
|
|
{
|
|
|
|
title: "Community",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "Twitter",
|
|
|
|
href: "https://twitter.com/LangChainAI",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "GitHub",
|
|
|
|
items: [
|
2024-05-30 07:17:59 +00:00
|
|
|
{
|
|
|
|
label: "Organization",
|
|
|
|
href: "https://github.com/langchain-ai",
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
{
|
|
|
|
label: "Python",
|
2023-10-01 19:30:58 +00:00
|
|
|
href: "https://github.com/langchain-ai/langchain",
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "JS/TS",
|
2023-10-01 19:30:58 +00:00
|
|
|
href: "https://github.com/langchain-ai/langchainjs",
|
2023-06-16 18:52:56 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "More",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
label: "Homepage",
|
|
|
|
href: "https://langchain.com",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "Blog",
|
|
|
|
href: "https://blog.langchain.dev",
|
|
|
|
},
|
2024-02-06 00:12:56 +00:00
|
|
|
{
|
|
|
|
label: "YouTube",
|
|
|
|
href: "https://www.youtube.com/@LangChain",
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
copyright: `Copyright © ${new Date().getFullYear()} LangChain, Inc.`,
|
|
|
|
},
|
2023-12-05 00:58:26 +00:00
|
|
|
algolia: {
|
|
|
|
// The application ID provided by Algolia
|
|
|
|
appId: "VAU016LAWS",
|
|
|
|
|
|
|
|
// Public API key: it is safe to commit it
|
|
|
|
// this is linked to erick@langchain.dev currently
|
|
|
|
apiKey: "6c01842d6a88772ed2236b9c85806441",
|
|
|
|
|
2024-09-16 01:33:42 +00:00
|
|
|
indexName: "python-langchain-latest",
|
2023-12-05 00:58:26 +00:00
|
|
|
|
2024-05-14 23:59:11 +00:00
|
|
|
contextualSearch: false,
|
2023-12-05 00:58:26 +00:00
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
}),
|
2023-09-25 18:54:32 +00:00
|
|
|
|
|
|
|
scripts: [
|
2024-05-10 13:49:59 +00:00
|
|
|
baseUrl + "js/google_analytics.js",
|
2023-09-25 18:54:32 +00:00
|
|
|
{
|
|
|
|
src: "https://www.googletagmanager.com/gtag/js?id=G-9B66JQQH2F",
|
|
|
|
async: true,
|
|
|
|
},
|
|
|
|
],
|
2024-03-11 21:23:12 +00:00
|
|
|
|
|
|
|
customFields: {
|
2024-03-11 22:38:05 +00:00
|
|
|
supabasePublicKey: process.env.NEXT_PUBLIC_SUPABASE_PUBLIC_KEY,
|
|
|
|
supabaseUrl: process.env.NEXT_PUBLIC_SUPABASE_URL,
|
2024-03-11 21:23:12 +00:00
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|