feat: merge v1 (#1733)
Co-authored-by: Tat Dat Duong <david@duong.cz> Co-authored-by: Christian Bromann <git@bromann.dev> Co-authored-by: Nuno Campos <nuno@langchain.dev> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Fix type issue with defining `interrupt` and `writer` in StateGraph constructor when using Annotation.Root
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": major
|
||||
---
|
||||
|
||||
Make Zod a peer dependency of @langchain/langgraph
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Add `pushMessage` method for manually publishing to messages stream channel
|
||||
@@ -13,8 +13,11 @@
|
||||
"access": "public",
|
||||
"baseBranch": "main",
|
||||
"updateInternalDependencies": "patch",
|
||||
"ignore": ["@langchain/langgraph-sdk-validation", "examples"],
|
||||
"ignore": [
|
||||
"@langchain/langgraph-sdk-validation",
|
||||
"@langchain/langgraph-benchmark"
|
||||
],
|
||||
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
||||
"onlyUpdatePeerDependentsWhenOutOfRange": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
chore(prebuilt): deprecate createReactAgent
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Improve performance of scheduling tasks with large graphs
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Improve graph execution performance by avoiding unnecessary cloning of checkpoints after every tick
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
fix(@langchain/langgraph): export missing `CommandParams` symbol
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Add `stream.encoding` option to emit LangGraph API events as Server-Sent Events. This allows for sending events through the wire by piping the stream to a `Response` object.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
fix(@langchain/langgraph): export missing `CommandInstance` symbol
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Update troubleshooting link for common errors, add MISSING_CHECKPOINTER troubleshooting page
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Fix `stateKey` property in `pushMessage` being ignored when RunnableConfig is automatically inherited
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Improve tick performance by detecting interrupts faster within a tick.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Improve tick performance by calling `maxChannelMapVersion` only once
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
feat(langgraph): add `toLangGraphEventStream` method to stream events in LGP compatible format
|
||||
@@ -0,0 +1,46 @@
|
||||
{
|
||||
"mode": "exit",
|
||||
"tag": "alpha",
|
||||
"initialVersions": {
|
||||
"@langchain/langgraph-checkpoint": "0.1.0",
|
||||
"@langchain/langgraph-checkpoint-mongodb": "0.1.0",
|
||||
"@langchain/langgraph-checkpoint-postgres": "0.1.1",
|
||||
"@langchain/langgraph-checkpoint-sqlite": "0.2.0",
|
||||
"@langchain/langgraph-checkpoint-validation": "0.1.0",
|
||||
"create-langgraph": "0.0.3",
|
||||
"@langchain/langgraph": "0.4.7",
|
||||
"@langchain/langgraph-api": "0.0.61",
|
||||
"@langchain/langgraph-cli": "0.0.61",
|
||||
"@langchain/langgraph-cua": "0.1.0",
|
||||
"@langchain/langgraph-supervisor": "0.0.19",
|
||||
"@langchain/langgraph-swarm": "0.0.6",
|
||||
"@langchain/langgraph-ui": "0.0.61",
|
||||
"@langchain/langgraph-sdk": "0.0.111",
|
||||
"@langchain/langgraph-sdk-validation": "0.0.0",
|
||||
"@langchain/build": "0.0.1",
|
||||
"@langchain/langgraph-benchmark": "0.0.0",
|
||||
"@langchain/langgraph-checkpoint-redis": "0.0.1"
|
||||
},
|
||||
"changesets": [
|
||||
"breezy-llamas-laugh",
|
||||
"bumpy-candies-bake",
|
||||
"calm-doodles-shave",
|
||||
"early-drinks-fold",
|
||||
"every-windows-lose",
|
||||
"famous-oranges-pay",
|
||||
"fluffy-otters-matter",
|
||||
"funny-houses-mate",
|
||||
"good-pugs-reply",
|
||||
"late-islands-work",
|
||||
"lazy-friends-beam",
|
||||
"many-bees-repeat",
|
||||
"odd-paws-destroy",
|
||||
"pink-vans-push",
|
||||
"red-ladybugs-fly",
|
||||
"shaggy-cycles-show",
|
||||
"shaky-items-repair",
|
||||
"shiny-banks-bet",
|
||||
"tame-humans-tap",
|
||||
"yellow-crabs-mate"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
fix(createReactAgent): update deprecation messages to contain reactAgent
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
`writer`, `interrupt` and `signal` is no longer an optional property of `Runtime`
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Add support for defining multiple interrupts in StateGraph constructor. Interrupts from the map can be picked from the `Runtime` object, ensuring type-safety across multiple interrupts.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Channels are now part of the public API, allowing users to customise behaviour of checkpointing per channel (#976)
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Allow defining types for interrupt and custom events upfront
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
"@langchain/langgraph-checkpoint-validation": major
|
||||
"@langchain/langgraph-supervisor": major
|
||||
"@langchain/langgraph-checkpoint-postgres": major
|
||||
"@langchain/langgraph-checkpoint-mongodb": major
|
||||
"@langchain/langgraph-checkpoint-sqlite": major
|
||||
"@langchain/langgraph-checkpoint-redis": major
|
||||
"create-langgraph": major
|
||||
"@langchain/langgraph-swarm": major
|
||||
"@langchain/langgraph-api": major
|
||||
"@langchain/langgraph-cli": major
|
||||
"@langchain/langgraph-cua": major
|
||||
"@langchain/langgraph-ui": major
|
||||
"@langchain/langgraph-checkpoint": major
|
||||
"@langchain/build": major
|
||||
"@langchain/langgraph": major
|
||||
"@langchain/langgraph-sdk": major
|
||||
---
|
||||
|
||||
This release updates the package for compatibility with LangGraph v1.0. See the [v1.0 release notes](https://docs.langchain.com/oss/javascript/releases/langgraph-v1) for details on what's new.
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph": patch
|
||||
---
|
||||
|
||||
Fix performance regression due to deferred nodes
|
||||
@@ -2,7 +2,7 @@ name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
branches: ["main", "v1"]
|
||||
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
|
||||
|
||||
concurrency:
|
||||
|
||||
@@ -4,9 +4,11 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v1
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- v1
|
||||
workflow_dispatch:
|
||||
|
||||
# If another push to the same PR or branch happens while this workflow is still running,
|
||||
@@ -20,7 +22,7 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
NODE_VERSION: "18.x"
|
||||
NODE_VERSION: "22.4.1"
|
||||
|
||||
# Run a separate job for each check in the docker-compose file,
|
||||
# so that they run in parallel instead of overwhelming the default 2 CPU runner.
|
||||
@@ -44,7 +46,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test esbuild exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-esbuild
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-esbuild
|
||||
|
||||
exports-esm:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -65,7 +67,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test esm exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-esm
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-esm
|
||||
|
||||
exports-cjs:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -86,7 +88,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test cjs exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-cjs
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-cjs
|
||||
|
||||
exports-cf:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -107,7 +109,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test cf exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-cf
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-cf
|
||||
|
||||
exports-vercel:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -128,7 +130,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test vercel exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-vercel
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-vercel
|
||||
|
||||
exports-vite:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -149,7 +151,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test vite exports
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-vite
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-vite
|
||||
|
||||
exports-tsc:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -170,4 +172,4 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Test compiling exports with tsc
|
||||
run: docker compose -f environment_tests/docker-compose.yml run test-exports-tsc
|
||||
run: docker compose -f internal/environment_tests/docker-compose.yml run test-exports-tsc
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
diff --git a/dist/lib/converter/converter.js b/dist/lib/converter/converter.js
|
||||
index 2438a37c1ce94b8b2b2537965c374a6471a7e729..3855e44031a41c27b52ed00566dc735605fc5a60 100644
|
||||
--- a/dist/lib/converter/converter.js
|
||||
+++ b/dist/lib/converter/converter.js
|
||||
@@ -442,7 +442,8 @@ let Converter = (() => {
|
||||
// Clone context in case deferred conversion uses different programs
|
||||
const entryContext = context.withScope(context.scope);
|
||||
entryContext.setActiveProgram(entry.program);
|
||||
- this.convertExports(entryContext, entry, createModuleReflections);
|
||||
+ // Hack 3, make sure that we flatten `index` into the root module
|
||||
+ this.convertExports(entryContext, entry, entry.displayName === "index" ? false : createModuleReflections);
|
||||
}
|
||||
this.finalizeDeferredConversion();
|
||||
}
|
||||
diff --git a/dist/lib/converter/plugins/GroupPlugin.js b/dist/lib/converter/plugins/GroupPlugin.js
|
||||
index 1f5ab57d619ff2a20f4b59e26d8d234f6553d9af..e879fe67665906ff2b7c901737bc4da9b3076b62 100644
|
||||
--- a/dist/lib/converter/plugins/GroupPlugin.js
|
||||
+++ b/dist/lib/converter/plugins/GroupPlugin.js
|
||||
@@ -193,6 +193,10 @@ let GroupPlugin = (() => {
|
||||
groups.add(String(reflection.frontmatter["group"]));
|
||||
}
|
||||
groups.delete("");
|
||||
+ // Hack: we want to group deprecated items in a separate group
|
||||
+ if (reflection.isDeprecated()) {
|
||||
+ groups.add("Deprecated");
|
||||
+ }
|
||||
if (groups.size === 0) {
|
||||
if (reflection instanceof ReferenceReflection &&
|
||||
groupReferencesByType) {
|
||||
diff --git a/dist/lib/output/router.js b/dist/lib/output/router.js
|
||||
index 2dadd8df70cefca52fb2d1cc104c8bf5783d1195..50c5f263740b52639681baa16abce8ccec629c6b 100644
|
||||
--- a/dist/lib/output/router.js
|
||||
+++ b/dist/lib/output/router.js
|
||||
@@ -359,6 +359,8 @@ export class KindRouter extends BaseRouter {
|
||||
reflection = reflection.parent;
|
||||
parts.unshift(createNormalizedUrl(reflection.name));
|
||||
}
|
||||
+ const prefix = createNormalizedUrl("@langchain/");
|
||||
+ if (parts[0].startsWith(prefix)) parts[0] = parts[0].slice(prefix.length);
|
||||
const baseName = parts.join(".");
|
||||
return `${dir}/${baseName}`;
|
||||
}
|
||||
@@ -396,6 +398,8 @@ export class StructureRouter extends BaseRouter {
|
||||
reflection = reflection.parent;
|
||||
parts.unshift(...reflection.name.split("/").map(createNormalizedUrl));
|
||||
}
|
||||
+ // Hack: Make sure that we're not creating a dummy _langchain folder
|
||||
+ if (parts[0] === createNormalizedUrl("@langchain")) parts.shift()
|
||||
// This should only happen if someone tries to break things with @module
|
||||
// I don't think it will ever occur in normal usage.
|
||||
if (parts.includes("..")) {
|
||||
diff --git a/dist/lib/output/themes/default/DefaultTheme.js b/dist/lib/output/themes/default/DefaultTheme.js
|
||||
index b6c97e6cd7c832256ed861f2da1c414c1485f8a8..7202ab3f44ca5db6353cbae64e3a4f2a1bd6923a 100644
|
||||
--- a/dist/lib/output/themes/default/DefaultTheme.js
|
||||
+++ b/dist/lib/output/themes/default/DefaultTheme.js
|
||||
@@ -234,7 +234,11 @@ let DefaultTheme = (() => {
|
||||
return filterMapWithNoneCollection(parent.categories);
|
||||
}
|
||||
if (parent.groups && shouldShowGroups(parent, opts)) {
|
||||
- return filterMapWithNoneCollection(parent.groups);
|
||||
+ // Hack: We want to group only certain groups, not all
|
||||
+ const includeGroups = ["Interfaces", "Type Aliases", "Deprecated", "Errors", "Graphs", "Functional API", "Pregel", "Constants", "Storage"];
|
||||
+ const grouped = parent.groups.filter(g => includeGroups.includes(g.title))
|
||||
+ const notGrouped = parent.groups.filter(g => !includeGroups.includes(g.title))
|
||||
+ return [...filterMap(notGrouped.flatMap(g => g.children), toNavigation), ...filterMapWithNoneCollection(grouped)];
|
||||
}
|
||||
if (opts.includeFolders && parent.childrenIncludingDocuments?.some((child) => child.name.includes("/"))) {
|
||||
return deriveModuleFolders(parent.childrenIncludingDocuments);
|
||||
diff --git a/dist/lib/utils/entry-point.js b/dist/lib/utils/entry-point.js
|
||||
index 0ba34b1f0d960ae1aef109c7b5bd7e2522fce418..c4d324bda6abc540f0a78647bc50f66ed2dae0a0 100644
|
||||
--- a/dist/lib/utils/entry-point.js
|
||||
+++ b/dist/lib/utils/entry-point.js
|
||||
@@ -6,6 +6,7 @@ import { deriveRootDir, getCommonDirectory, MinimatchSet, nicePath, normalizePat
|
||||
import { discoverPackageJson, glob, inferPackageEntryPointPaths, isDir } from "./fs.js";
|
||||
import { assertNever, i18n } from "#utils";
|
||||
import { addInferredDeclarationMapPaths, resolveDeclarationMaps } from "./declaration-maps.js";
|
||||
+import { createRequire } from "node:module";
|
||||
/**
|
||||
* Defines how entry points are interpreted.
|
||||
* @enum
|
||||
@@ -37,8 +38,25 @@ export function inferEntryPoints(logger, options, programs) {
|
||||
logger.warn(i18n.no_entry_points_provided());
|
||||
return [];
|
||||
}
|
||||
- const pathEntries = inferPackageEntryPointPaths(packageJson.file);
|
||||
+ let pathEntries = inferPackageEntryPointPaths(packageJson.file);
|
||||
const entryPoints = [];
|
||||
+ // Hack 1: see if we can rewrite to source files
|
||||
+ try {
|
||||
+ const lcRootDir = getCommonDirectory(pathEntries.map((p) => p[1]));
|
||||
+ const lcConfig = createRequire(import.meta.url)(join(lcRootDir, "langchain.config.js"));
|
||||
+
|
||||
+ pathEntries = pathEntries.map(([origName, origPath]) => {
|
||||
+ let lcName = origName;
|
||||
+ if (lcName.startsWith("./")) lcName = lcName.slice(2);
|
||||
+ if (lcName.startsWith(".")) lcName = "index";
|
||||
+
|
||||
+ const lcEntryPoint = lcConfig.config.entrypoints[lcName];
|
||||
+ if (lcEntryPoint) return [origName, resolve(lcRootDir, "src", lcEntryPoint + ".ts")];
|
||||
+ return [origName, origPath];
|
||||
+ });
|
||||
+ } catch {
|
||||
+ // pass
|
||||
+ }
|
||||
programs ||= getEntryPrograms(pathEntries.map((p) => p[1]), logger, options);
|
||||
// See also: addInferredDeclarationMapPaths in symbol-id factory
|
||||
const jsToTsSource = new Map();
|
||||
@@ -53,7 +71,10 @@ export function inferEntryPoints(logger, options, programs) {
|
||||
}
|
||||
for (const [name, path] of pathEntries) {
|
||||
// Strip leading ./ from the display name
|
||||
- const displayName = name.replace(/^\.\/?/, "");
|
||||
+ let displayName = name.replace(/^\.\/?/, "");
|
||||
+ // Hack 2: make sure we resolve displayName to "." for "index"
|
||||
+ // That will allow us to collapse the URL
|
||||
+ displayName ||= "index"
|
||||
const targetPath = jsToTsSource.get(path) || resolveDeclarationMaps(path) || path;
|
||||
const program = programs.find((p) => p.getSourceFile(targetPath));
|
||||
if (program) {
|
||||
@@ -18,9 +18,8 @@ To learn more about how to use LangGraph, check out [the docs](https://langchain
|
||||
|
||||
```ts
|
||||
// npm install @langchain-anthropic
|
||||
import { createReactAgent } from "@langchain/langgraph/prebuilt";
|
||||
import { createReactAgent, tool } from "langchain";
|
||||
import { ChatAnthropic } from "@langchain/anthropic";
|
||||
import { tool } from "@langchain/core/tools";
|
||||
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ build-docs: generate-prebuilt-page
|
||||
fi \
|
||||
fi
|
||||
python -m mkdocs build --clean -f mkdocs.yml --strict -d site
|
||||
yarn run build
|
||||
|
||||
generate-prebuilt-page:
|
||||
# Use to create an update to date prebuilt page.
|
||||
|
||||
@@ -15,7 +15,7 @@ _MANUAL = {
|
||||
"examples/how-tos/stream-tokens.ipynb",
|
||||
],
|
||||
"tutorials": [
|
||||
"quickstart.ipynb",
|
||||
"quickstart/quickstart.ipynb",
|
||||
"chatbots/customer_support_mistral.ipynb",
|
||||
"rag/langgraph_agentic_rag.ipynb",
|
||||
"rag/langgraph_crag.ipynb",
|
||||
|
||||
@@ -26,7 +26,7 @@ def _make_llms_text(output_file: str) -> str:
|
||||
"""
|
||||
# Collect all markdown and notebook files
|
||||
all_files = [
|
||||
os.path.join(EXAMPLES_ROOT, "quickstart.ipynb"),
|
||||
os.path.join(EXAMPLES_ROOT, "quickstart/quickstart.ipynb"),
|
||||
]
|
||||
|
||||
all_files.extend(
|
||||
|
||||
@@ -52,14 +52,6 @@ plugins:
|
||||
- search:
|
||||
separator: '[\s\u200b\-_,:!=\[\]()"`/]+|\.(?!\d)|&[lg]t;|(?!\b)(?=[A-Z][a-z])'
|
||||
- autorefs
|
||||
- typedoc:
|
||||
# One level of globbing is intentional
|
||||
source: "../libs/*/*.d.ts"
|
||||
output_dir: "./reference"
|
||||
tsconfig: "../tsconfig.json"
|
||||
options: "typedoc.json"
|
||||
name: "API Reference"
|
||||
title_link: "/" # optional, default: '/'
|
||||
- open-in-new-tab
|
||||
|
||||
nav:
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"description": "Dependencies for LangGraph docs.",
|
||||
"scripts": {
|
||||
"build": "typedoc --options typedoc.jsonc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typedoc": "patch:typedoc@npm%3A0.28.11#~/.yarn/patches/typedoc-npm-0.28.11-18b71eb2e0.patch"
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
"navigationLinks": {
|
||||
"Back to documentation": "/langgraphjs/"
|
||||
},
|
||||
"excludeInternal": true,
|
||||
"excludePrivate": true,
|
||||
"plugin": ["./plugins/typedoc/google_analytics/index.js"],
|
||||
"gtmId": "G-WR87FQLG9F"
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"navigationLinks": {
|
||||
"Back to documentation": "/langgraphjs/"
|
||||
},
|
||||
"out": "./site/reference",
|
||||
"sort": [
|
||||
"kind",
|
||||
"visibility",
|
||||
"required-first",
|
||||
"instance-first",
|
||||
"alphabetical"
|
||||
],
|
||||
"entryPoints": [
|
||||
"../libs/checkpoint",
|
||||
"../libs/checkpoint-mongodb",
|
||||
"../libs/checkpoint-postgres",
|
||||
"../libs/checkpoint-sqlite",
|
||||
"../libs/checkpoint-validation",
|
||||
"../libs/langgraph",
|
||||
"../libs/langgraph-cua",
|
||||
"../libs/langgraph-supervisor",
|
||||
"../libs/langgraph-swarm",
|
||||
"../libs/sdk"
|
||||
],
|
||||
"entryPointStrategy": "packages",
|
||||
"packageOptions": {
|
||||
"excludePrivate": true,
|
||||
"excludeInternal": true,
|
||||
"excludeExternals": false,
|
||||
"excludeNotDocumented": false,
|
||||
"skipErrorChecking": true
|
||||
},
|
||||
"navigation": {
|
||||
"includeFolders": false,
|
||||
"includeGroups": true,
|
||||
"includeCategories": true,
|
||||
"excludeReferences": true
|
||||
},
|
||||
"name": "LangGraph.js API Reference",
|
||||
"plugin": ["./plugins/typedoc/google_analytics/index.js"],
|
||||
"gtmId": "G-WR87FQLG9F"
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
version: "3"
|
||||
services:
|
||||
test-exports-esbuild:
|
||||
image: node:18
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-esbuild:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-esm:
|
||||
image: node:18
|
||||
environment:
|
||||
PUPPETEER_SKIP_DOWNLOAD: "true"
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-esm:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-tsc:
|
||||
image: node:18
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-tsc:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-cjs:
|
||||
image: node:18
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-cjs:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-cf:
|
||||
image: node:18
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-cf:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-vercel:
|
||||
image: node:18
|
||||
environment:
|
||||
PUPPETEER_SKIP_DOWNLOAD: "true"
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-vercel:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
test-exports-vite:
|
||||
image: node:18
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../yarn.lock:/root/yarn.lock
|
||||
- ../.yarnrc.yml:/root/.yarnrc.yml
|
||||
- ../.yarn:/root/.yarn
|
||||
- ../environment_tests/test-exports-vite:/package
|
||||
- ../environment_tests/scripts:/scripts
|
||||
- ../libs/langgraph:/langgraph
|
||||
- ../libs/checkpoint:/checkpoint
|
||||
command: bash /scripts/docker-ci-entrypoint.sh
|
||||
success:
|
||||
image: alpine:3.14
|
||||
command: echo "Success"
|
||||
depends_on:
|
||||
test-exports-esbuild:
|
||||
condition: service_completed_successfully
|
||||
test-exports-esm:
|
||||
condition: service_completed_successfully
|
||||
test-exports-tsc:
|
||||
condition: service_completed_successfully
|
||||
test-exports-cjs:
|
||||
condition: service_completed_successfully
|
||||
test-exports-cf:
|
||||
condition: service_completed_successfully
|
||||
test-exports-vercel:
|
||||
condition: service_completed_successfully
|
||||
test-exports-vite:
|
||||
condition: service_completed_successfully
|
||||
@@ -1,97 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
||||
/* Projects */
|
||||
// "incremental": true, /* Enable incremental compilation */
|
||||
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
||||
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
||||
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
||||
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
||||
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
||||
/* Language and Environment */
|
||||
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
||||
"lib": [
|
||||
"es2021"
|
||||
] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
||||
"jsx": "react" /* Specify what JSX code is generated. */,
|
||||
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
||||
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
||||
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
||||
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
||||
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
||||
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
||||
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
||||
/* Modules */
|
||||
"module": "es2022" /* Specify what module code is generated. */,
|
||||
// "rootDir": "./", /* Specify the root folder within your source files. */
|
||||
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
||||
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
||||
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
||||
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
||||
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
||||
"types": [
|
||||
"@cloudflare/workers-types"
|
||||
] /* Specify type package names to be included without being referenced in a source file. */,
|
||||
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
||||
"resolveJsonModule": true /* Enable importing .json files */,
|
||||
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
||||
/* JavaScript Support */
|
||||
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
||||
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
|
||||
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
||||
/* Emit */
|
||||
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
||||
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
||||
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
||||
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
||||
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
||||
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
||||
// "removeComments": true, /* Disable emitting comments. */
|
||||
"noEmit": true /* Disable emitting files from a compilation. */,
|
||||
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
||||
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
||||
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
||||
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
||||
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
||||
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
||||
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
||||
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
||||
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
||||
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
||||
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
||||
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
||||
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
||||
/* Interop Constraints */
|
||||
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
||||
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
||||
// "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
||||
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
||||
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
||||
/* Type Checking */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
||||
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
||||
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
||||
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
||||
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
||||
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
||||
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
||||
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
||||
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
||||
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
||||
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
||||
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
||||
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
||||
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
||||
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
||||
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
||||
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
||||
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
||||
/* Completeness */
|
||||
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
||||
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
||||
}
|
||||
}
|
||||
@@ -97,15 +97,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"execution_count": null,
|
||||
"id": "25789946",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import { TavilySearchResults } from \"@langchain/community/tools/tavily_search\";\n",
|
||||
"import { TavilySearch } from \"@langchain/tavily\";\n",
|
||||
"import { ToolNode } from \"@langchain/langgraph/prebuilt\";\n",
|
||||
"\n",
|
||||
"const tools = [new TavilySearchResults({ maxResults: 1 })];\n",
|
||||
"const tools = [new TavilySearch({ maxResults: 1 })];\n",
|
||||
"\n",
|
||||
"const toolNode = new ToolNode<typeof AgentState.State>(tools);"
|
||||
]
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@examples/agent_executor",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"tslab": "^1.0.22",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
}
|
||||
@@ -2,31 +2,14 @@
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": [
|
||||
"ES2021",
|
||||
"ES2022.Object",
|
||||
"ES2022.Error",
|
||||
"DOM"
|
||||
],
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"sourceMap": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"baseUrl": "./src",
|
||||
"declaration": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules/",
|
||||
"dist/",
|
||||
"tests/"
|
||||
],
|
||||
"include": [
|
||||
"*.ts",
|
||||
"./src"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -71,15 +71,15 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": null,
|
||||
"id": "5cf3331e-ccb3-41c8-aeb9-a840a94d41e7",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import { ToolExecutor } from \"@langchain/langgraph/prebuilt\";\n",
|
||||
"import { TavilySearchResults } from \"@langchain/community/tools/tavily_search\";\n",
|
||||
"import { TavilySearch } from \"@langchain/tavily\";\n",
|
||||
"\n",
|
||||
"const tools = [new TavilySearchResults({ maxResults: 1 })];\n",
|
||||
"const tools = [new TavilySearch({ maxResults: 1 })];\n",
|
||||
"\n",
|
||||
"const toolExecutor = new ToolExecutor({\n",
|
||||
" tools,\n",
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "@examples/chat_agent_executor_with_function_calling",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"tslab": "^1.0.22",
|
||||
"zod": "^3.23.8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/chatbot-simulation-evaluation",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/chatbots",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/how-tos",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/multi_agent",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
{
|
||||
"name": "examples",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"description": "Dependencies for LangGraph examples.",
|
||||
"scripts": {
|
||||
"start": "tsx --experimental-wasm-modules -r dotenv/config src/index.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^0.3.12",
|
||||
"@langchain/community": "^0.3.27",
|
||||
"@langchain/core": "^0.3.40",
|
||||
"@langchain/groq": "^0.1.3",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^0.2.0",
|
||||
"@langchain/ollama": "^0.1.0",
|
||||
"@langchain/openai": "^0.4.0",
|
||||
"@langchain/textsplitters": "^0.1.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^0.3.13",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/plan-and-execute",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/quickstart",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/rag",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/reflection",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "@examples/rewoo",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"devDependencies": {
|
||||
"@langchain/anthropic": "^1.0.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/groq": "^1.0.0",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/mistralai": "^1.0.0",
|
||||
"@langchain/ollama": "^1.0.0",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"@langchain/tavily": "^1.0.0",
|
||||
"@langchain/textsplitters": "^1.0.0",
|
||||
"@xenova/transformers": "2.17.2",
|
||||
"cheerio": "^1.0.0",
|
||||
"chromadb": "^1.8.1",
|
||||
"d3": "^7.9.0",
|
||||
"dotenv": "^16.4.5",
|
||||
"langchain": "^1.0.0-alpha",
|
||||
"pg": "^8.11.0",
|
||||
"tslab": "^1.0.22",
|
||||
"tsx": "^4.19.3",
|
||||
"uuid": "^10.0.0",
|
||||
"zod": "^3.23.8",
|
||||
"zod-to-json-schema": "^3.23.2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"outDir": "dist",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"target": "ES2021",
|
||||
"module": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
import path from "path";
|
||||
import url from "url";
|
||||
import { awaitAllCallbacks } from "@langchain/core/callbacks/promises";
|
||||
|
||||
const [exampleName, ...args] = process.argv.slice(2);
|
||||
|
||||
if (!exampleName) {
|
||||
console.error("Please provide path to example to run");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
// Allow people to pass all possible variations of a path to an example
|
||||
// ./src/foo.ts, ./dist/foo.js, src/foo.ts, dist/foo.js, foo.ts
|
||||
let exampleRelativePath = exampleName;
|
||||
|
||||
if (exampleRelativePath.startsWith("./examples/")) {
|
||||
exampleRelativePath = exampleName.slice(11);
|
||||
} else if (exampleRelativePath.startsWith("examples/")) {
|
||||
exampleRelativePath = exampleName.slice(9);
|
||||
}
|
||||
|
||||
if (exampleRelativePath.startsWith("./src/")) {
|
||||
exampleRelativePath = exampleRelativePath.slice(6);
|
||||
} else if (exampleRelativePath.startsWith("./dist/")) {
|
||||
exampleRelativePath = exampleRelativePath.slice(7);
|
||||
} else if (exampleRelativePath.startsWith("src/")) {
|
||||
exampleRelativePath = exampleRelativePath.slice(4);
|
||||
} else if (exampleRelativePath.startsWith("dist/")) {
|
||||
exampleRelativePath = exampleRelativePath.slice(5);
|
||||
}
|
||||
|
||||
let runExample;
|
||||
try {
|
||||
({ run: runExample } = await import(
|
||||
path.join(
|
||||
path.dirname(url.fileURLToPath(import.meta.url)),
|
||||
exampleRelativePath
|
||||
)
|
||||
));
|
||||
} catch (e) {
|
||||
console.log(e);
|
||||
throw new Error(`Could not load example ${exampleName}: ${e}`);
|
||||
}
|
||||
|
||||
if (runExample) {
|
||||
const maybePromise = runExample(args);
|
||||
|
||||
if (maybePromise instanceof Promise) {
|
||||
maybePromise
|
||||
.catch((e) => {
|
||||
console.error(`Example failed with:`);
|
||||
console.error(e);
|
||||
})
|
||||
.finally(() => awaitAllCallbacks());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||
<title>Vite + React + TS</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/client.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "@examples/ui-react-transport",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "turbo dev:client dev:server",
|
||||
"dev:client": "vite",
|
||||
"dev:server": "tsx watch --env-file=.env --clear-screen=false src/server.mts",
|
||||
"build:internal": "tsc -b && vite build",
|
||||
"format": "prettier --write src",
|
||||
"lint": "prettier --check src",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@hono/node-server": "^1.12.0",
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/langgraph-sdk": "workspace:*",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"hono": "^4.8.2",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"prettier": "^2.8.3",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import {
|
||||
useStream,
|
||||
FetchStreamTransport,
|
||||
} from "@langchain/langgraph-sdk/react";
|
||||
|
||||
export function App() {
|
||||
const stream = useStream({
|
||||
transport: new FetchStreamTransport({ apiUrl: "/api/stream" }),
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="max-w-xl mx-auto">
|
||||
<div className="flex flex-col gap-2">
|
||||
{stream.messages.map((message) => (
|
||||
<div key={message.id} className="whitespace-pre-wrap">
|
||||
{message.content as string}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<form
|
||||
className="grid grid-cols-[1fr_auto] gap-2"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const form = e.target as HTMLFormElement;
|
||||
const formData = new FormData(form);
|
||||
const content = formData.get("content") as string;
|
||||
|
||||
form.reset();
|
||||
stream.submit({ messages: [{ content, type: "human" }] });
|
||||
}}
|
||||
>
|
||||
<textarea
|
||||
name="content"
|
||||
className="field-sizing-content"
|
||||
onKeyDown={(e) => {
|
||||
const target = e.target as HTMLTextAreaElement;
|
||||
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
target.form?.requestSubmit();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>
|
||||
);
|
||||
@@ -0,0 +1,42 @@
|
||||
import type { BaseMessage } from "@langchain/core/messages";
|
||||
import { StateGraph, MessagesZodMeta, START } from "@langchain/langgraph";
|
||||
import { registry } from "@langchain/langgraph/zod";
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
import { serve } from "@hono/node-server";
|
||||
import { Hono } from "hono";
|
||||
|
||||
const llm = new ChatOpenAI({ model: "gpt-4o-mini" });
|
||||
|
||||
const schema = z.object({
|
||||
messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),
|
||||
});
|
||||
|
||||
const graph = new StateGraph(schema)
|
||||
.addNode("agent", async ({ messages }) => ({
|
||||
messages: await llm.invoke(messages),
|
||||
}))
|
||||
.addEdge(START, "agent")
|
||||
.compile();
|
||||
|
||||
export type GraphType = typeof graph;
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
app.post("/api/stream", async (c) => {
|
||||
const { input } = z.object({ input: schema }).parse(await c.req.json());
|
||||
|
||||
const stream = await graph.stream(input, {
|
||||
encoding: "text/event-stream",
|
||||
streamMode: ["values", "messages", "updates"],
|
||||
});
|
||||
|
||||
return new Response(stream, {
|
||||
headers: { "Content-Type": "text/event-stream" },
|
||||
});
|
||||
});
|
||||
|
||||
serve({ fetch: app.fetch, port: 9123 }, (c) => {
|
||||
console.log(`Server running at ${c.address}:${c.port}`);
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2023",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": [
|
||||
"//"
|
||||
],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": [
|
||||
"**/dist/**"
|
||||
]
|
||||
},
|
||||
"build:internal": {
|
||||
"dependsOn": [
|
||||
"^build:internal"
|
||||
],
|
||||
"outputs": [
|
||||
"**/dist/**"
|
||||
]
|
||||
},
|
||||
"dev:client": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"dev:server": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
clearScreen: false,
|
||||
server: { proxy: { "/api": "http://localhost:9123" } },
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
lerna-debug.log*
|
||||
|
||||
node_modules
|
||||
dist
|
||||
dist-ssr
|
||||
*.local
|
||||
|
||||
# Editor directories and files
|
||||
.vscode/*
|
||||
!.vscode/extensions.json
|
||||
.idea
|
||||
.DS_Store
|
||||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
# LangGraph API
|
||||
.langgraph_api
|
||||
@@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>
|
||||
<title>Vite + React + TS</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/client.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"node_version": "22",
|
||||
"graphs": {
|
||||
"agent": "./src/agent.mts:graph"
|
||||
},
|
||||
"env": ".env"
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "@examples/ui-react",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "turbo dev:client dev:server",
|
||||
"dev:client": "vite",
|
||||
"dev:server": "langgraphjs dev --no-browser",
|
||||
"build:internal": "tsc -b && vite build",
|
||||
"format": "prettier --write src",
|
||||
"lint": "prettier --check src",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@langchain/core": "^1.0.1",
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@langchain/langgraph-sdk": "workspace:*",
|
||||
"@langchain/openai": "^1.0.0",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@langchain/langgraph-cli": "workspace:*",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@vitejs/plugin-react": "^4.4.1",
|
||||
"prettier": "^2.8.3",
|
||||
"tsx": "^4.19.3",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^6.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import type { BaseMessage } from "@langchain/core/messages";
|
||||
import { StateGraph, MessagesZodMeta, START } from "@langchain/langgraph";
|
||||
import { registry } from "@langchain/langgraph/zod";
|
||||
import { ChatOpenAI } from "@langchain/openai";
|
||||
import { z } from "zod/v4";
|
||||
|
||||
const llm = new ChatOpenAI({ model: "gpt-4o-mini" });
|
||||
|
||||
const schema = z.object({
|
||||
messages: z.custom<BaseMessage[]>().register(registry, MessagesZodMeta),
|
||||
});
|
||||
|
||||
export const graph = new StateGraph(schema)
|
||||
.addNode("agent", async ({ messages }) => ({
|
||||
messages: await llm.invoke(messages),
|
||||
}))
|
||||
.addEdge(START, "agent")
|
||||
.compile();
|
||||
@@ -0,0 +1,56 @@
|
||||
import { StrictMode } from "react";
|
||||
import { createRoot } from "react-dom/client";
|
||||
|
||||
import { useStream } from "@langchain/langgraph-sdk/react";
|
||||
|
||||
export function App() {
|
||||
const stream = useStream({
|
||||
assistantId: "agent",
|
||||
apiUrl: "http://localhost:2024",
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="max-w-xl mx-auto">
|
||||
<div className="flex flex-col gap-2">
|
||||
{stream.messages.map((message) => (
|
||||
<div key={message.id} className="whitespace-pre-wrap">
|
||||
{message.content as string}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<form
|
||||
className="grid grid-cols-[1fr_auto] gap-2"
|
||||
onSubmit={(e) => {
|
||||
e.preventDefault();
|
||||
|
||||
const form = e.target as HTMLFormElement;
|
||||
const formData = new FormData(form);
|
||||
const content = formData.get("content") as string;
|
||||
|
||||
form.reset();
|
||||
stream.submit({ messages: [{ content, type: "human" }] });
|
||||
}}
|
||||
>
|
||||
<textarea
|
||||
name="content"
|
||||
className="field-sizing-content"
|
||||
onKeyDown={(e) => {
|
||||
const target = e.target as HTMLTextAreaElement;
|
||||
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
e.preventDefault();
|
||||
target.form?.requestSubmit();
|
||||
}
|
||||
}}
|
||||
/>
|
||||
<button type="submit">Submit</button>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
createRoot(document.getElementById("root")!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>
|
||||
);
|
||||
@@ -0,0 +1 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx",
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2023",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
|
||||
/* Linting */
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"erasableSyntaxOnly": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUncheckedSideEffectImports": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"extends": [
|
||||
"//"
|
||||
],
|
||||
"tasks": {
|
||||
"build": {
|
||||
"outputs": [
|
||||
"**/dist/**"
|
||||
]
|
||||
},
|
||||
"build:internal": {
|
||||
"dependsOn": [
|
||||
"^build:internal"
|
||||
],
|
||||
"outputs": [
|
||||
"**/dist/**"
|
||||
]
|
||||
},
|
||||
"dev:client": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
},
|
||||
"dev:server": {
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { defineConfig } from "vite";
|
||||
import react from "@vitejs/plugin-react";
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
clearScreen: false,
|
||||
});
|
||||
|
Before Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 96 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 47 KiB |
|
Before Width: | Height: | Size: 42 KiB |
|
Before Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 56 KiB |
@@ -0,0 +1,9 @@
|
||||
# LangGraph Benchmarks
|
||||
|
||||
This package contains benchmarks for the LangGraph.js.
|
||||
|
||||
## Running the tests
|
||||
|
||||
```bash
|
||||
yarn test
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "@langchain/langgraph-benchmark",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"format": "prettier --write src",
|
||||
"lint": "prettier --check src",
|
||||
"bench": "vitest bench"
|
||||
},
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@langchain/langgraph": "workspace:*",
|
||||
"@tsconfig/recommended": "^1.0.2",
|
||||
"@types/node": "^18.15.11",
|
||||
"prettier": "^2.8.3",
|
||||
"typescript": "^4.9.5 || ^5.4.5",
|
||||
"vitest": "^3.1.2"
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { HumanMessage } from "@langchain/core/messages";
|
||||
import { MemorySaver } from "@langchain/langgraph-checkpoint";
|
||||
import { createSequential } from "./sequential.js";
|
||||
import { reactAgent } from "./react_agent.js";
|
||||
import { runGraph, runFirstEventLatency } from "./bench.utils.js";
|
||||
import { runGraph, runFirstEventLatency } from "./utils.js";
|
||||
|
||||
// Sequential benchmarks
|
||||
describe("sequential_10", () => {
|
||||
@@ -1,13 +1,11 @@
|
||||
/* eslint-disable no-promise-executor-return */
|
||||
/* eslint-disable import/order */
|
||||
/* eslint-disable import/first */
|
||||
/* eslint-disable no-promise-executor-return, import/order, import/first */
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { AIMessage, HumanMessage } from "@langchain/core/messages";
|
||||
import { tool } from "@langchain/core/tools";
|
||||
import { z } from "zod/v3";
|
||||
import { MemorySaver } from "@langchain/langgraph-checkpoint";
|
||||
import { createReactAgent } from "../../prebuilt/index.js";
|
||||
import { FakeToolCallingChatModel } from "../utils.models.js";
|
||||
import { createReactAgent } from "@langchain/langgraph/prebuilt";
|
||||
import { FakeToolCallingChatModel } from "./utils.js";
|
||||
|
||||
/**
|
||||
* Creates a React agent with specified number of tools for benchmarking.
|
||||
@@ -78,7 +76,7 @@ async function main() {
|
||||
console.timeEnd("stream");
|
||||
|
||||
if (inspector.url()) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 360_000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 3_600_000));
|
||||
}
|
||||
|
||||
return result.length;
|
||||
@@ -1,12 +1,10 @@
|
||||
/* eslint-disable no-promise-executor-return */
|
||||
/* eslint-disable import/order */
|
||||
/* eslint-disable import/first */
|
||||
/* eslint-disable no-promise-executor-return, import/order, import/first */
|
||||
import {
|
||||
MessagesAnnotation,
|
||||
StateGraph,
|
||||
StateType,
|
||||
UpdateType,
|
||||
} from "../../index.js";
|
||||
} from "@langchain/langgraph";
|
||||
|
||||
/**
|
||||
* Create a sequential no-op graph consisting of many nodes.
|
||||
@@ -53,7 +51,7 @@ async function main() {
|
||||
console.timeEnd("stream");
|
||||
|
||||
if (inspector.url()) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 360_000));
|
||||
await new Promise((resolve) => setTimeout(resolve, 3_600_000));
|
||||
}
|
||||
|
||||
return result.length;
|
||||
@@ -0,0 +1,186 @@
|
||||
/* eslint-disable no-promise-executor-return, import/no-extraneous-dependencies */
|
||||
import { BaseMessage } from "@langchain/core/messages";
|
||||
import { CallbackManagerForLLMRun } from "@langchain/core/callbacks/manager";
|
||||
|
||||
import {
|
||||
BaseChatModelParams,
|
||||
BaseChatModel,
|
||||
BindToolsInput,
|
||||
BaseChatModelCallOptions,
|
||||
} from "@langchain/core/language_models/chat_models";
|
||||
|
||||
import { ChatResult } from "@langchain/core/outputs";
|
||||
import { RunnableLambda } from "@langchain/core/runnables";
|
||||
|
||||
import type { CompiledStateGraph } from "@langchain/langgraph";
|
||||
import { randomUUID } from "crypto";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
export type AnyStateGraph = CompiledStateGraph<any, any, any, any, any, any>;
|
||||
|
||||
// Helper functions
|
||||
export const runGraph = async (
|
||||
graph: AnyStateGraph,
|
||||
input: Record<string, unknown>
|
||||
) => {
|
||||
const results = await gatherIterator(
|
||||
graph.stream(input, {
|
||||
configurable: { thread_id: randomUUID() },
|
||||
recursionLimit: 1000000000,
|
||||
})
|
||||
);
|
||||
return results.length;
|
||||
};
|
||||
|
||||
export const runFirstEventLatency = async (
|
||||
graph: AnyStateGraph,
|
||||
input: Record<string, unknown>
|
||||
) => {
|
||||
const iterator = await graph.stream(input, {
|
||||
configurable: { thread_id: randomUUID() },
|
||||
recursionLimit: 1000000000,
|
||||
});
|
||||
await iterator.next();
|
||||
};
|
||||
|
||||
export class FakeToolCallingChatModel extends BaseChatModel {
|
||||
sleep?: number = 50;
|
||||
|
||||
responses?: BaseMessage[];
|
||||
|
||||
thrownErrorString?: string;
|
||||
|
||||
idx: number;
|
||||
|
||||
toolStyle: "openai" | "anthropic" | "bedrock" | "google" = "openai";
|
||||
|
||||
structuredResponse?: Record<string, unknown>;
|
||||
|
||||
// Track messages passed to structured output calls
|
||||
structuredOutputMessages: BaseMessage[][] = [];
|
||||
|
||||
constructor(
|
||||
fields: {
|
||||
sleep?: number;
|
||||
responses?: BaseMessage[];
|
||||
thrownErrorString?: string;
|
||||
toolStyle?: "openai" | "anthropic" | "bedrock" | "google";
|
||||
structuredResponse?: Record<string, unknown>;
|
||||
} & BaseChatModelParams
|
||||
) {
|
||||
super(fields);
|
||||
this.sleep = fields.sleep ?? this.sleep;
|
||||
this.responses = fields.responses;
|
||||
this.thrownErrorString = fields.thrownErrorString;
|
||||
this.idx = 0;
|
||||
this.toolStyle = fields.toolStyle ?? this.toolStyle;
|
||||
this.structuredResponse = fields.structuredResponse;
|
||||
this.structuredOutputMessages = [];
|
||||
}
|
||||
|
||||
_llmType() {
|
||||
return "fake";
|
||||
}
|
||||
|
||||
async _generate(
|
||||
messages: BaseMessage[],
|
||||
_options: this["ParsedCallOptions"],
|
||||
runManager?: CallbackManagerForLLMRun
|
||||
): Promise<ChatResult> {
|
||||
if (this.thrownErrorString) {
|
||||
throw new Error(this.thrownErrorString);
|
||||
}
|
||||
if (this.sleep !== undefined) {
|
||||
await new Promise((resolve) => setTimeout(resolve, this.sleep));
|
||||
}
|
||||
const responses = this.responses?.length ? this.responses : messages;
|
||||
const msg = responses[this.idx % responses.length];
|
||||
const generation: ChatResult = {
|
||||
generations: [
|
||||
{
|
||||
text: "",
|
||||
message: msg,
|
||||
},
|
||||
],
|
||||
};
|
||||
this.idx += 1;
|
||||
|
||||
if (typeof msg.content === "string") {
|
||||
await runManager?.handleLLMNewToken(msg.content);
|
||||
}
|
||||
return generation;
|
||||
}
|
||||
|
||||
bindTools(tools: BindToolsInput[]) {
|
||||
const toolDicts = [];
|
||||
const serverTools = [];
|
||||
for (const tool of tools) {
|
||||
if (!("name" in tool)) {
|
||||
serverTools.push(tool);
|
||||
continue;
|
||||
}
|
||||
|
||||
// NOTE: this is a simplified tool spec for testing purposes only
|
||||
if (this.toolStyle === "openai") {
|
||||
toolDicts.push({
|
||||
type: "function",
|
||||
function: {
|
||||
name: tool.name,
|
||||
},
|
||||
});
|
||||
} else if (["anthropic", "google"].includes(this.toolStyle)) {
|
||||
toolDicts.push({
|
||||
name: tool.name,
|
||||
});
|
||||
} else if (this.toolStyle === "bedrock") {
|
||||
toolDicts.push({
|
||||
toolSpec: {
|
||||
name: tool.name,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
let toolsToBind: BindToolsInput[] = toolDicts;
|
||||
if (this.toolStyle === "google") {
|
||||
toolsToBind = [{ functionDeclarations: toolDicts }];
|
||||
}
|
||||
return this.bind({
|
||||
tools: [...toolsToBind, ...serverTools],
|
||||
} as BaseChatModelCallOptions);
|
||||
}
|
||||
|
||||
withStructuredOutput<
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
RunOutput extends Record<string, any> = Record<string, any>
|
||||
>(_: unknown) {
|
||||
if (!this.structuredResponse) {
|
||||
throw new Error("No structured response provided");
|
||||
}
|
||||
// Create a runnable that returns the proper structured format
|
||||
return RunnableLambda.from(async (messages: BaseMessage[]) => {
|
||||
if (this.sleep) {
|
||||
await new Promise((resolve) => setTimeout(resolve, this.sleep));
|
||||
}
|
||||
|
||||
// Store the messages that were sent to generate structured output
|
||||
this.structuredOutputMessages.push([...messages]);
|
||||
|
||||
// Return in the format expected: { raw: BaseMessage, parsed: RunOutput }
|
||||
return this.structuredResponse as RunOutput;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export async function gatherIterator<T>(
|
||||
i:
|
||||
| AsyncIterable<T>
|
||||
| Promise<AsyncIterable<T>>
|
||||
| Iterable<T>
|
||||
| Promise<Iterable<T>>
|
||||
): Promise<Array<T>> {
|
||||
const out: T[] = [];
|
||||
for await (const item of await i) {
|
||||
out.push(item);
|
||||
}
|
||||
return out;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"extends": "@tsconfig/recommended",
|
||||
"compilerOptions": {
|
||||
"target": "ES2021",
|
||||
"lib": ["ES2021", "ES2022.Object", "ES2022.Error", "DOM"],
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "nodenext",
|
||||
"esModuleInterop": true,
|
||||
"declaration": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"strictPropertyInitialization": false,
|
||||
"allowJs": true,
|
||||
"strict": true,
|
||||
"jsx": "react-jsx",
|
||||
"outDir": "dist"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "dist", "coverage"],
|
||||
"includeVersion": true
|
||||
}
|
||||