Skip to content

Commit d23e9f9

Browse files
authored
Merge remote-tracking branch 'upstream/main' into add-aca-sessions (#3)
* Bump @azure/identity to 4.2.0 * Merge remote-tracking branch 'upstream/main' into add-aca-sessions
1 parent 12181ca commit d23e9f9

File tree

1,830 files changed

+104066
-77091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,830 files changed

+104066
-77091
lines changed

.github/DISCUSSION_TEMPLATE/q-a.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ body:
2121
Relevant links to check before opening a question to see if your question has already been answered, fixed or
2222
if there's another way to solve your problem:
2323
24-
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
25-
[API Reference](https://api.js.langchain.com/),
24+
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
25+
[API Reference](https://v02.api.js.langchain.com/),
2626
[GitHub search](https://github.com/langchain-ai/langchainjs),
2727
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
2828
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ body:
1515
Relevant links to check before filing a bug report to see if your issue has already been reported, fixed or
1616
if there's another way to solve your problem:
1717
18-
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
19-
[API Reference](https://api.js.langchain.com/),
18+
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
19+
[API Reference](https://v02.api.js.langchain.com/),
2020
[GitHub search](https://github.com/langchain-ai/langchainjs),
2121
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
2222
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),

.github/ISSUE_TEMPLATE/documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ body:
2020
If you're in the wrong place, here are some helpful links to find a better
2121
place to ask your question:
2222
23-
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
24-
[API Reference](https://api.js.langchain.com/),
23+
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
24+
[API Reference](https://v02.api.js.langchain.com/),
2525
[GitHub search](https://github.com/langchain-ai/langchainjs),
2626
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
2727
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),

.github/workflows/build-examples.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/compatibility.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ env:
2323
PUPPETEER_SKIP_DOWNLOAD: "true"
2424
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
2525
NODE_VERSION: "18.x"
26+
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
2627

2728
# Run a separate job for each check in the docker-compose file,
2829
# so that they run in parallel instead of overwhelming the default 2 CPU runner.

.github/workflows/examples.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Build Examples
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
# Only run if examples, langchain, core, or integration package code changes.
11+
paths:
12+
- 'examples/**'
13+
- 'langchain/**'
14+
- 'langchain-core/**'
15+
- 'libs/**/**'
16+
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
17+
18+
19+
# If another push to the same PR or branch happens while this workflow is still running,
20+
# cancel the earlier run in favor of the next run.
21+
#
22+
# There's no point in testing an outdated version of the code. GitHub only allows
23+
# a limited number of job runners to be active at the same time, so it's better to cancel
24+
# pointless jobs early so that more useful jobs can run sooner.
25+
concurrency:
26+
group: ${{ github.workflow }}-${{ github.ref }}
27+
cancel-in-progress: true
28+
29+
jobs:
30+
build:
31+
name: Build
32+
runs-on: ubuntu-latest
33+
strategy:
34+
fail-fast: false
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Use Node.js 18.x
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: 18.x
41+
- name: Install dependencies
42+
run: yarn install --immutable
43+
- name: Build examples
44+
run: yarn turbo:command build --filter=examples

.github/workflows/standard-tests.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: Standard Tests (Integration)
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 13 * * *'
7+
8+
jobs:
9+
standard-tests:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
package: [anthropic, cohere, google-genai, groq, mistralai]
14+
steps:
15+
- uses: actions/checkout@v4
16+
- name: Use Node.js 18.x
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 18.x
20+
cache: "yarn"
21+
- name: Install dependencies
22+
run: yarn install --immutable --mode=skip-build
23+
- name: Run standard tests (integration) for ${{ matrix.package }}
24+
run: yarn test:standard:int --filter=@langchain/${{ matrix.package }}
25+
env:
26+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
27+
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
28+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
29+
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
30+
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
31+
32+
# The `@langchain/openai` package contains standard tests for ChatOpenAI and AzureChatOpenAI
33+
# We want to run these separately, so we need to pass the exact path for each test, which means
34+
# we need separate jobs for each test.
35+
standard-tests-openai:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- uses: actions/checkout@v4
39+
- name: Use Node.js 18.x
40+
uses: actions/setup-node@v3
41+
with:
42+
node-version: 18.x
43+
cache: "yarn"
44+
- name: Install dependencies
45+
run: yarn install --immutable --mode=skip-build
46+
- name: Build `@langchain/openai`
47+
run: yarn build --filter=@langchain/openai
48+
- name: Run standard tests (integration) for ChatOpenAI
49+
run: yarn workspace @langchain/openai test:single src/tests/chat_models.standard.int.test.ts
50+
env:
51+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
52+
53+
standard-tests-azure-openai:
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@v4
57+
- name: Use Node.js 18.x
58+
uses: actions/setup-node@v3
59+
with:
60+
node-version: 18.x
61+
cache: "yarn"
62+
- name: Install dependencies
63+
run: yarn install --immutable --mode=skip-build
64+
- name: Build `@langchain/openai`
65+
run: yarn build --filter=@langchain/openai
66+
- name: Run standard tests (integration) for `@langchain/openai` AzureChatOpenAI
67+
run: yarn workspace @langchain/openai test:single src/tests/azure/chat_models.standard.int.test.ts
68+
env:
69+
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
70+
AZURE_OPENAI_API_DEPLOYMENT_NAME: "chat"
71+
AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }}
72+
AZURE_OPENAI_BASE_PATH: ${{ secrets.AZURE_OPENAI_BASE_PATH }}
73+
74+
standard-tests-bedrock:
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Use Node.js 18.x
79+
uses: actions/setup-node@v3
80+
with:
81+
node-version: 18.x
82+
cache: "yarn"
83+
- name: Install dependencies
84+
run: yarn install --immutable --mode=skip-build
85+
- name: Build `@langchain/community`
86+
run: yarn build --filter=@langchain/community
87+
- name: Run standard tests (integration) for `@langchain/community` BedrockChat
88+
run: yarn workspace @langchain/community test:single src/chat_models/tests/chatbedrock.standard.int.test.ts
89+
env:
90+
BEDROCK_AWS_REGION: "us-east-1"
91+
BEDROCK_AWS_SECRET_ACCESS_KEY: ${{ secrets.BEDROCK_AWS_SECRET_ACCESS_KEY }}
92+
BEDROCK_AWS_ACCESS_KEY_ID: ${{ secrets.BEDROCK_AWS_ACCESS_KEY_ID }}

.github/workflows/test-exports.yml

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ env:
2424
jobs:
2525
exports-esbuild:
2626
runs-on: ubuntu-latest
27+
strategy:
28+
fail-fast: false
2729
steps:
2830
- uses: actions/checkout@v4
2931
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -33,17 +35,18 @@ jobs:
3335
cache: "yarn"
3436
- name: Install dependencies
3537
run: yarn install --immutable
36-
- name: Build
37-
run: yarn workspace langchain build
38+
39+
- name: Build dependencies
40+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
3841
shell: bash
39-
env:
40-
SKIP_API_DOCS: true
4142

4243
- name: Test esbuild exports
4344
run: docker compose -f environment_tests/docker-compose.yml run test-exports-esbuild
4445

4546
exports-esm:
4647
runs-on: ubuntu-latest
48+
strategy:
49+
fail-fast: false
4750
steps:
4851
- uses: actions/checkout@v4
4952
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -53,17 +56,18 @@ jobs:
5356
cache: "yarn"
5457
- name: Install dependencies
5558
run: yarn install --immutable
56-
- name: Build
57-
run: yarn workspace langchain build
59+
60+
- name: Build dependencies
61+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
5862
shell: bash
59-
env:
60-
SKIP_API_DOCS: true
6163

6264
- name: Test esm exports
6365
run: docker compose -f environment_tests/docker-compose.yml run test-exports-esm
6466

6567
exports-cjs:
6668
runs-on: ubuntu-latest
69+
strategy:
70+
fail-fast: false
6771
steps:
6872
- uses: actions/checkout@v4
6973
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -73,17 +77,18 @@ jobs:
7377
cache: "yarn"
7478
- name: Install dependencies
7579
run: yarn install --immutable
76-
- name: Build
77-
run: yarn workspace langchain build
80+
81+
- name: Build dependencies
82+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
7883
shell: bash
79-
env:
80-
SKIP_API_DOCS: true
8184

8285
- name: Test cjs exports
8386
run: docker compose -f environment_tests/docker-compose.yml run test-exports-cjs
8487

8588
exports-cf:
8689
runs-on: ubuntu-latest
90+
strategy:
91+
fail-fast: false
8792
steps:
8893
- uses: actions/checkout@v4
8994
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -93,17 +98,18 @@ jobs:
9398
cache: "yarn"
9499
- name: Install dependencies
95100
run: yarn install --immutable
96-
- name: Build
97-
run: yarn workspace langchain build
101+
102+
- name: Build dependencies
103+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
98104
shell: bash
99-
env:
100-
SKIP_API_DOCS: true
101105

102106
- name: Test cf exports
103107
run: docker compose -f environment_tests/docker-compose.yml run test-exports-cf
104108

105109
exports-vercel:
106110
runs-on: ubuntu-latest
111+
strategy:
112+
fail-fast: false
107113
steps:
108114
- uses: actions/checkout@v4
109115
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -113,17 +119,18 @@ jobs:
113119
cache: "yarn"
114120
- name: Install dependencies
115121
run: yarn install --immutable
116-
- name: Build
117-
run: yarn workspace langchain build
122+
123+
- name: Build dependencies
124+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
118125
shell: bash
119-
env:
120-
SKIP_API_DOCS: true
121126

122127
- name: Test vercel exports
123128
run: docker compose -f environment_tests/docker-compose.yml run test-exports-vercel
124129

125130
exports-vite:
126131
runs-on: ubuntu-latest
132+
strategy:
133+
fail-fast: false
127134
steps:
128135
- uses: actions/checkout@v4
129136
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -133,17 +140,18 @@ jobs:
133140
cache: "yarn"
134141
- name: Install dependencies
135142
run: yarn install --immutable
136-
- name: Build
137-
run: yarn workspace langchain build
143+
144+
- name: Build dependencies
145+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
138146
shell: bash
139-
env:
140-
SKIP_API_DOCS: true
141147

142148
- name: Test vite exports
143149
run: docker compose -f environment_tests/docker-compose.yml run test-exports-vite
144150

145151
exports-tsc:
146152
runs-on: ubuntu-latest
153+
strategy:
154+
fail-fast: false
147155
steps:
148156
- uses: actions/checkout@v4
149157
- name: Use Node.js ${{ env.NODE_VERSION }}
@@ -153,11 +161,10 @@ jobs:
153161
cache: "yarn"
154162
- name: Install dependencies
155163
run: yarn install --immutable
156-
- name: Build
157-
run: yarn workspace langchain build
164+
165+
- name: Build dependencies
166+
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
158167
shell: bash
159-
env:
160-
SKIP_API_DOCS: true
161168

162169
- name: Test compiling exports with tsc
163170
run: docker compose -f environment_tests/docker-compose.yml run test-exports-tsc
@@ -176,8 +183,6 @@ jobs:
176183
# - name: Build
177184
# run: yarn workspace langchain build
178185
# shell: bash
179-
# env:
180-
# SKIP_API_DOCS: true
181186

182187
# - name: Test bun exports
183188
# run: docker compose -f environment_tests/docker-compose.yml run test-exports-bun

0 commit comments

Comments
 (0)