Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

major: Add JS SDK API refs & langsmith-sdk submodule #202

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
subdirectories/
sdk-api-js/
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ __pycache__

.idea

.yarn/cache
.yarn/cache

# Autogenerated on build
sdk-api-js/
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
path = subdirectories/langsmith-cookbook
url = https://github.com/langchain-ai/langsmith-cookbook.git
branch = main
[submodule "subdirectories/langsmith-sdk"]
path = subdirectories/langsmith-sdk
url = https://github.com/langchain-ai/langsmith-sdk.git
branch = main
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
build
.docusaurus
docs/api
docs/api
subdirectories/
sdk-api-js/
31 changes: 31 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,32 @@ const config = {
},
},
],
[
"docusaurus-plugin-typedoc",
{
out: "sdk-api-js",
sort: [
"kind",
"visibility",
"instance-first",
"required-first",
"alphabetical",
],
tsconfig: "./subdirectories/langsmith-sdk/js/tsconfig.json",
readme: "none",
excludePrivate: true,
excludeInternal: true,
excludeExternals: true,
excludeNotDocumented: false,
includeVersion: true,
sourceLinkTemplate:
"https://github.com/langchain-ai/langsmith-sdk/blob/{gitRevision}/{path}#L{line}",
logLevel: "Error",
name: "LangSmith SDK (JS/TS)",
skipErrorChecking: true,
exclude: ["dist"],
},
],
],

presets: [
Expand Down Expand Up @@ -109,6 +135,11 @@ const config = {
srcDark: "img/langsmith-logo-white.svg",
},
items: [
{
to: "/sdk-api-js",
position: "left",
label: "LangSmith SDK (JS/TS) API",
},
{
type: "search",
position: "right",
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"docusaurus": "docusaurus",
"test": "jest",
"start": "rm -rf ./docs/api && docusaurus start",
"build": "rm -rf ./build && docusaurus build",
"build": "rm -rf ./build && yarn install:deps:sdk && docusaurus build",
"install:deps:sdk": "cd ./subdirectories/langsmith-sdk && yarn install",
"vercel-build": "git submodule update --init --recursive && python3 -m ensurepip --default-pip && python3 -m pip install -r subdirectories/scripts/requirements.txt && python3 subdirectories/scripts/build_cookbook.py && ls docs && npm run build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
Expand All @@ -29,6 +30,7 @@
"@docusaurus/remark-plugin-npm2yarn": "^2.4.3",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@tsconfig/recommended": "^1.0.2",
"@mdx-js/react": "^1.6.22",
"@mui/icons-material": "^5.11.16",
"@mui/joy": "^5.0.0-alpha.81",
Expand All @@ -50,7 +52,7 @@
"@docusaurus/module-type-aliases": "^2.4.1",
"@tsconfig/docusaurus": "^1.0.7",
"@types/jest": "^29.5.3",
"docusaurus-plugin-typedoc": "next",
"docusaurus-plugin-typedoc": "^0.22.0",
"dotenv": "^16.4.5",
"eslint": "^8.19.0",
"eslint-config-airbnb": "^19.0.4",
Expand All @@ -65,8 +67,8 @@
"langsmith": "^0.0.47",
"supabase": "^1.148.6",
"ts-jest": "^29.1.1",
"typedoc": "^0.24.4",
"typedoc-plugin-markdown": "next",
"typedoc": "^0.25.13",
"typedoc-plugin-markdown": "^3.17.1",
"typescript": "^5.1.6"
},
"browserslist": {
Expand Down
1 change: 1 addition & 0 deletions subdirectories/langsmith-sdk
Submodule langsmith-sdk added at d9ef5d
67 changes: 48 additions & 19 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2983,6 +2983,11 @@
resolved "https://registry.yarnpkg.com/@tsconfig/docusaurus/-/docusaurus-1.0.7.tgz#a3ee3c8109b3fec091e3d61a61834e563aeee3c3"
integrity sha512-ffTXxGIP/IRMCjuzHd6M4/HdIrw1bMfC7Bv8hMkTadnePkpe0lG0oDSdbRpSDZb2rQMAgpbWiR10BvxvNYwYrg==

"@tsconfig/recommended@^1.0.2":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@tsconfig/recommended/-/recommended-1.0.6.tgz#217b78f9601215939d566a79d202a760ae185114"
integrity sha512-0IKu9GHYF1NGTJiYgfWwqnOQSlnE9V9R7YohHNNf0/fj/SyOZWzdd06JFr0fLpg1Mqw0kGbYg8w5xdkSqLKM9g==

"@types/babel__core@^7.1.14":
version "7.20.5"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017"
Expand Down Expand Up @@ -5357,10 +5362,10 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"

docusaurus-plugin-typedoc@next:
version "1.0.0-next.27"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-1.0.0-next.27.tgz#a8617163b63cde9604da0f45451bb2053d2218a2"
integrity sha512-X0A0SSczmPXiyOS86ydQWhyfpZkPgBLP7lZ83m3+98W7kQSefzS7OcrjMBJA6ojLiXjF7VxrEi+0C3P+DnyF0A==
docusaurus-plugin-typedoc@^0.22.0:
version "0.22.0"
resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-0.22.0.tgz#3731c19e18083c1217ef954dc64b667ddbd0b120"
integrity sha512-5q+oT+iq3g9DvsMin11pSSmqHRw0i62csHBzkWVtgmsqN/BwGDHnxDiTbHhhkBNQpmRIRgltyNdMnO5x+JUK8Q==

dom-converter@^0.2.0:
version "0.2.0"
Expand Down Expand Up @@ -6649,6 +6654,18 @@ handle-thing@^2.0.0:
resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.1.tgz#857f79ce359580c340d43081cc648970d0bb234e"
integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg==

handlebars@^4.7.7:
version "4.7.8"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.8.tgz#41c42c18b1be2365439188c77c6afae71c0cd9e9"
integrity sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==
dependencies:
minimist "^1.2.5"
neo-async "^2.6.2"
source-map "^0.6.1"
wordwrap "^1.0.0"
optionalDependencies:
uglify-js "^3.1.4"

has-bigints@^1.0.1, has-bigints@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa"
Expand Down Expand Up @@ -9133,10 +9150,10 @@ [email protected], minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch
dependencies:
brace-expansion "^1.1.7"

minimatch@^9.0.0:
version "9.0.3"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825"
integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==
minimatch@^9.0.3:
version "9.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51"
integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
dependencies:
brace-expansion "^2.0.1"

Expand Down Expand Up @@ -11195,7 +11212,7 @@ shelljs@^0.8.5:
interpret "^1.0.0"
rechoir "^0.6.2"

shiki@^0.14.1:
shiki@^0.14.7:
version "0.14.7"
resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.7.tgz#c3c9e1853e9737845f1d2ef81b31bcfb07056d4e"
integrity sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==
Expand Down Expand Up @@ -11875,20 +11892,22 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typedoc-plugin-markdown@next:
version "4.0.0-next.53"
resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.0.0-next.53.tgz#0cae65c81ce569957ef81931e07daac2d0cd621e"
integrity sha512-vESy94SQV77EaDALA7WvLYPGtPKAuDtqhtShZA6sNs+OxkW8Uh+DoZ5Q6gpgu0MnIkLijHnv038kNP87Gl2vpw==
typedoc-plugin-markdown@^3.17.1:
version "3.17.1"
resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.17.1.tgz#c33f42363c185adf842f4699166015f7fe0ed02b"
integrity sha512-QzdU3fj0Kzw2XSdoL15ExLASt2WPqD7FbLeaqwT70+XjKyTshBnUlQA5nNREO1C2P8Uen0CDjsBLMsCQ+zd0lw==
dependencies:
handlebars "^4.7.7"

typedoc@^0.24.4:
version "0.24.8"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.8.tgz#cce9f47ba6a8d52389f5e583716a2b3b4335b63e"
integrity sha512-ahJ6Cpcvxwaxfu4KtjA8qZNqS43wYt6JL27wYiIgl1vd38WW/KWX11YuAeZhuz9v+ttrutSsgK+XO1CjL1kA3w==
typedoc@^0.25.13:
version "0.25.13"
resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.25.13.tgz#9a98819e3b2d155a6d78589b46fa4c03768f0922"
integrity sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==
dependencies:
lunr "^2.3.9"
marked "^4.3.0"
minimatch "^9.0.0"
shiki "^0.14.1"
minimatch "^9.0.3"
shiki "^0.14.7"

typescript@^5.1.6:
version "5.4.2"
Expand All @@ -11900,6 +11919,11 @@ ua-parser-js@^1.0.35:
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-1.0.37.tgz#b5dc7b163a5c1f0c510b08446aed4da92c46373f"
integrity sha512-bhTyI94tZofjo+Dn8SN6Zv8nBDvyXTymAdM3LDI/0IboIUwTu1rEhW7v2TfiVsoYWgkQ4kOVqnI8APUFbIQIFQ==

uglify-js@^3.1.4:
version "3.17.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c"
integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==

unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
Expand Down Expand Up @@ -12661,6 +12685,11 @@ wildcard@^2.0.0:
resolved "https://registry.yarnpkg.com/wildcard/-/wildcard-2.0.1.tgz#5ab10d02487198954836b6349f74fff961e10f67"
integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==

wordwrap@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
Expand Down
Loading