mirror of
https://github.com/hwchase17/langchain
synced 2024-11-08 07:10:35 +00:00
4759d10cf6
<!-- 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>
331 lines
8.8 KiB
JavaScript
331 lines
8.8 KiB
JavaScript
/* 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");
|
|
|
|
const baseLightCodeBlockTheme = require("prism-react-renderer/themes/vsLight");
|
|
const baseDarkCodeBlockTheme = require("prism-react-renderer/themes/vsDark");
|
|
|
|
/** @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: "/",
|
|
|
|
onBrokenLinks: "warn",
|
|
onBrokenMarkdownLinks: "throw",
|
|
|
|
themes: ["@docusaurus/theme-mermaid"],
|
|
markdown: {
|
|
mermaid: true,
|
|
},
|
|
|
|
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: {
|
|
fullySpecified: false,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
}),
|
|
],
|
|
|
|
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,
|
|
autoCollapseCategories: true,
|
|
},
|
|
},
|
|
colorMode: {
|
|
disableSwitch: false,
|
|
respectPrefersColorScheme: true,
|
|
},
|
|
prism: {
|
|
theme: {
|
|
...baseLightCodeBlockTheme,
|
|
plain: {
|
|
...baseLightCodeBlockTheme.plain,
|
|
backgroundColor: "#F5F5F5",
|
|
},
|
|
},
|
|
darkTheme: {
|
|
...baseDarkCodeBlockTheme,
|
|
plain: {
|
|
...baseDarkCodeBlockTheme.plain,
|
|
backgroundColor: "#222222",
|
|
},
|
|
},
|
|
},
|
|
image: "img/parrot-chainlink-icon.png",
|
|
navbar: {
|
|
title: "🦜️🔗 LangChain",
|
|
items: [
|
|
{
|
|
to: "/docs/get_started/introduction",
|
|
label: "Docs",
|
|
position: "left",
|
|
},
|
|
{
|
|
type: "docSidebar",
|
|
position: "left",
|
|
sidebarId: "use_cases",
|
|
label: "Use cases",
|
|
},
|
|
{
|
|
type: "docSidebar",
|
|
position: "left",
|
|
sidebarId: "integrations",
|
|
label: "Integrations",
|
|
},
|
|
{
|
|
type: "docSidebar",
|
|
position: "left",
|
|
sidebarId: "guides",
|
|
label: "Guides",
|
|
},
|
|
{
|
|
href: "https://api.python.langchain.com",
|
|
label: "API",
|
|
position: "left",
|
|
},
|
|
{
|
|
type: "dropdown",
|
|
label: "More",
|
|
position: "left",
|
|
items: [
|
|
{
|
|
to: "/docs/packages",
|
|
label: "Versioning",
|
|
},
|
|
{
|
|
type: "docSidebar",
|
|
sidebarId: "changelog",
|
|
label: "Changelog",
|
|
},
|
|
{
|
|
to: "/docs/contributing",
|
|
label: "Developer's guide",
|
|
},
|
|
{
|
|
type: "docSidebar",
|
|
sidebarId: "templates",
|
|
label: "Templates",
|
|
},
|
|
{
|
|
label: "Cookbooks",
|
|
href: "https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md"
|
|
},
|
|
{
|
|
to: "/docs/additional_resources/tutorials",
|
|
label: "Tutorials"
|
|
},
|
|
{
|
|
to: "/docs/additional_resources/youtube",
|
|
label: "YouTube videos"
|
|
},
|
|
]
|
|
},
|
|
{
|
|
type: "dropdown",
|
|
label: "🦜️🔗",
|
|
position: "right",
|
|
items: [
|
|
{
|
|
href: "https://smith.langchain.com",
|
|
label: "LangSmith",
|
|
},
|
|
{
|
|
href: "https://docs.smith.langchain.com/",
|
|
label: "LangSmith Docs",
|
|
},
|
|
{
|
|
href: "https://github.com/langchain-ai/langserve",
|
|
label: "LangServe GitHub",
|
|
},
|
|
{
|
|
href: "https://github.com/langchain-ai/langchain/tree/master/templates",
|
|
label: "Templates GitHub",
|
|
},
|
|
{
|
|
label: "Templates Hub",
|
|
href: "https://templates.langchain.com",
|
|
},
|
|
{
|
|
href: "https://smith.langchain.com/hub",
|
|
label: "LangChain Hub",
|
|
},
|
|
{
|
|
href: "https://js.langchain.com",
|
|
label: "JS/TS Docs",
|
|
},
|
|
]
|
|
},
|
|
{
|
|
href: "https://chat.langchain.com",
|
|
label: "Chat",
|
|
position: "right",
|
|
},
|
|
// Please keep GitHub link to the right for consistency.
|
|
{
|
|
href: "https://github.com/langchain-ai/langchain",
|
|
position: "right",
|
|
className: "header-github-link",
|
|
"aria-label": "GitHub repository",
|
|
},
|
|
],
|
|
},
|
|
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",
|
|
href: "https://github.com/langchain-ai/langchain",
|
|
},
|
|
{
|
|
label: "JS/TS",
|
|
href: "https://github.com/langchain-ai/langchainjs",
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: "More",
|
|
items: [
|
|
{
|
|
label: "Homepage",
|
|
href: "https://langchain.com",
|
|
},
|
|
{
|
|
label: "Blog",
|
|
href: "https://blog.langchain.dev",
|
|
},
|
|
],
|
|
},
|
|
],
|
|
copyright: `Copyright © ${new Date().getFullYear()} LangChain, Inc.`,
|
|
},
|
|
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,
|
|
},
|
|
}),
|
|
|
|
scripts: [
|
|
"/js/google_analytics.js",
|
|
{
|
|
src: "https://www.googletagmanager.com/gtag/js?id=G-9B66JQQH2F",
|
|
async: true,
|
|
},
|
|
],
|
|
|
|
};
|
|
|
|
module.exports = config;
|