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");
|
|
|
|
const path = require("path");
|
|
|
|
|
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
|
|
|
|
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
|
|
const config = {
|
|
|
|
title: "🦜️🔗 Langchain",
|
|
|
|
tagline: "LangChain Python Docs",
|
|
|
|
favicon: "img/favicon.ico",
|
|
|
|
// 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>/'
|
|
|
|
baseUrl: "/",
|
|
|
|
|
2023-06-20 21:06:50 +00:00
|
|
|
onBrokenLinks: "warn",
|
|
|
|
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,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
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: {
|
|
|
|
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");
|
|
|
|
}
|
|
|
|
});
|
|
|
|
return sidebarItems;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
pages: {
|
|
|
|
remarkPlugins: [require("@docusaurus/remark-plugin-npm2yarn")],
|
|
|
|
},
|
|
|
|
theme: {
|
|
|
|
customCss: require.resolve("./src/css/custom.css"),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
themeConfig:
|
|
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
|
|
({
|
|
|
|
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
|
|
|
},
|
|
|
|
image: "img/parrot-chainlink-icon.png",
|
|
|
|
navbar: {
|
|
|
|
title: "🦜️🔗 LangChain",
|
|
|
|
items: [
|
2023-07-21 20:52:03 +00:00
|
|
|
{
|
|
|
|
to: "/docs/get_started/introduction",
|
|
|
|
label: "Docs",
|
|
|
|
position: "left",
|
|
|
|
},
|
|
|
|
{
|
2023-09-25 18:54:32 +00:00
|
|
|
type: "docSidebar",
|
|
|
|
position: "left",
|
|
|
|
sidebarId: "use_cases",
|
|
|
|
label: "Use cases",
|
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
|
|
|
},
|
2023-11-06 15:07:25 +00:00
|
|
|
{
|
|
|
|
type: "docSidebar",
|
|
|
|
position: "left",
|
|
|
|
sidebarId: "guides",
|
|
|
|
label: "Guides",
|
|
|
|
},
|
2023-07-21 20:52:03 +00:00
|
|
|
{
|
2023-12-13 21:42:01 +00:00
|
|
|
href: "https://api.python.langchain.com",
|
2023-07-21 20:52:03 +00:00
|
|
|
label: "API",
|
|
|
|
position: "left",
|
|
|
|
},
|
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: [
|
2023-11-10 07:36:21 +00:00
|
|
|
{
|
|
|
|
type: "docSidebar",
|
|
|
|
sidebarId: "templates",
|
|
|
|
label: "Templates",
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
|
|
|
to: "/docs/community",
|
|
|
|
label: "Community",
|
|
|
|
},
|
2023-10-25 19:28:43 +00:00
|
|
|
{
|
|
|
|
to: "/docs/contributing",
|
|
|
|
label: "Developer's guide",
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
|
|
|
to: "/docs/additional_resources/dependents",
|
|
|
|
label: "Dependents",
|
|
|
|
},
|
2023-11-15 03:49:17 +00:00
|
|
|
{
|
|
|
|
label: "Integrations Hub",
|
|
|
|
href: "https://integrations.langchain.com/",
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
|
|
|
to: "/docs/additional_resources/tutorials",
|
|
|
|
label: "Tutorials"
|
|
|
|
},
|
2023-11-14 18:52:47 +00:00
|
|
|
{
|
|
|
|
label: "Cookbooks",
|
|
|
|
href: "https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md"
|
|
|
|
},
|
2023-10-24 19:28:08 +00:00
|
|
|
{
|
|
|
|
to: "/docs/additional_resources/youtube",
|
|
|
|
label: "YouTube videos"
|
|
|
|
},
|
|
|
|
{ label: "Gallery", href: "https://github.com/kyrolabs/awesome-langchain" }
|
|
|
|
]
|
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://github.com/langchain-ai/langserve",
|
|
|
|
label: "LangServe GitHub",
|
2023-10-24 19:28:08 +00:00
|
|
|
},
|
2023-11-09 23:05:18 +00:00
|
|
|
{
|
|
|
|
href: "https://github.com/langchain-ai/langchain/tree/master/templates",
|
|
|
|
label: "Templates GitHub",
|
|
|
|
},
|
2023-12-03 23:36:35 +00:00
|
|
|
{
|
|
|
|
label: "Templates Hub",
|
|
|
|
href: "https://templates.langchain.com",
|
|
|
|
},
|
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",
|
|
|
|
label: "Chat",
|
|
|
|
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: "Discord",
|
|
|
|
href: "https://discord.gg/cU2adEyC7w",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
label: "Twitter",
|
|
|
|
href: "https://twitter.com/LangChainAI",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
title: "GitHub",
|
|
|
|
items: [
|
|
|
|
{
|
|
|
|
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",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
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",
|
|
|
|
|
|
|
|
indexName: "python-langchain",
|
|
|
|
|
|
|
|
contextualSearch: true,
|
|
|
|
},
|
2023-06-16 18:52:56 +00:00
|
|
|
}),
|
2023-09-25 18:54:32 +00:00
|
|
|
|
|
|
|
scripts: [
|
|
|
|
"/js/google_analytics.js",
|
|
|
|
{
|
|
|
|
src: "https://www.googletagmanager.com/gtag/js?id=G-9B66JQQH2F",
|
|
|
|
async: true,
|
|
|
|
},
|
|
|
|
],
|
2023-12-05 00:58:26 +00:00
|
|
|
|
2023-06-16 18:52:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = config;
|