Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into add-aca-sessions (#3)
Browse files Browse the repository at this point in the history
* Bump @azure/identity to 4.2.0

* Merge remote-tracking branch 'upstream/main' into add-aca-sessions
  • Loading branch information
anthonychu authored Jun 10, 2024
1 parent 12181ca commit d23e9f9
Show file tree
Hide file tree
Showing 1,830 changed files with 104,066 additions and 77,091 deletions.
4 changes: 2 additions & 2 deletions .github/DISCUSSION_TEMPLATE/q-a.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ body:
Relevant links to check before opening a question to see if your question has already been answered, fixed or
if there's another way to solve your problem:
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
[API Reference](https://api.js.langchain.com/),
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
[API Reference](https://v02.api.js.langchain.com/),
[GitHub search](https://github.com/langchain-ai/langchainjs),
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ body:
Relevant links to check before filing a bug report to see if your issue has already been reported, fixed or
if there's another way to solve your problem:
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
[API Reference](https://api.js.langchain.com/),
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
[API Reference](https://v02.api.js.langchain.com/),
[GitHub search](https://github.com/langchain-ai/langchainjs),
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ body:
If you're in the wrong place, here are some helpful links to find a better
place to ask your question:
[LangChain.js documentation with the integrated search](https://js.langchain.com/docs/get_started/introduction),
[API Reference](https://api.js.langchain.com/),
[LangChain.js documentation with the integrated search](https://js.langchain.com/v0.2/docs/introduction),
[API Reference](https://v02.api.js.langchain.com/),
[GitHub search](https://github.com/langchain-ai/langchainjs),
[LangChain.js Github Discussions](https://github.com/langchain-ai/langchainjs/discussions),
[LangChain.js Github Issues](https://github.com/langchain-ai/langchainjs/issues?q=is%3Aissue),
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/build-examples.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ env:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
NODE_VERSION: "18.x"
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}

# 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.
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Build Examples

on:
push:
branches: ["main"]
pull_request:
# Only run if examples, langchain, core, or integration package code changes.
paths:
- 'examples/**'
- 'langchain/**'
- 'langchain-core/**'
- 'libs/**/**'
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI


# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
# There's no point in testing an outdated version of the code. GitHub only allows
# a limited number of job runners to be active at the same time, so it's better to cancel
# pointless jobs early so that more useful jobs can run sooner.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Install dependencies
run: yarn install --immutable
- name: Build examples
run: yarn turbo:command build --filter=examples
92 changes: 92 additions & 0 deletions .github/workflows/standard-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Standard Tests (Integration)

on:
workflow_dispatch:
schedule:
- cron: '0 13 * * *'

jobs:
standard-tests:
runs-on: ubuntu-latest
strategy:
matrix:
package: [anthropic, cohere, google-genai, groq, mistralai]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Run standard tests (integration) for ${{ matrix.package }}
run: yarn test:standard:int --filter=@langchain/${{ matrix.package }}
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
GROQ_API_KEY: ${{ secrets.GROQ_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}

# The `@langchain/openai` package contains standard tests for ChatOpenAI and AzureChatOpenAI
# We want to run these separately, so we need to pass the exact path for each test, which means
# we need separate jobs for each test.
standard-tests-openai:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Build `@langchain/openai`
run: yarn build --filter=@langchain/openai
- name: Run standard tests (integration) for ChatOpenAI
run: yarn workspace @langchain/openai test:single src/tests/chat_models.standard.int.test.ts
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

standard-tests-azure-openai:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Build `@langchain/openai`
run: yarn build --filter=@langchain/openai
- name: Run standard tests (integration) for `@langchain/openai` AzureChatOpenAI
run: yarn workspace @langchain/openai test:single src/tests/azure/chat_models.standard.int.test.ts
env:
AZURE_OPENAI_API_KEY: ${{ secrets.AZURE_OPENAI_API_KEY }}
AZURE_OPENAI_API_DEPLOYMENT_NAME: "chat"
AZURE_OPENAI_API_VERSION: ${{ secrets.AZURE_OPENAI_API_VERSION }}
AZURE_OPENAI_BASE_PATH: ${{ secrets.AZURE_OPENAI_BASE_PATH }}

standard-tests-bedrock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Build `@langchain/community`
run: yarn build --filter=@langchain/community
- name: Run standard tests (integration) for `@langchain/community` BedrockChat
run: yarn workspace @langchain/community test:single src/chat_models/tests/chatbedrock.standard.int.test.ts
env:
BEDROCK_AWS_REGION: "us-east-1"
BEDROCK_AWS_SECRET_ACCESS_KEY: ${{ secrets.BEDROCK_AWS_SECRET_ACCESS_KEY }}
BEDROCK_AWS_ACCESS_KEY_ID: ${{ secrets.BEDROCK_AWS_ACCESS_KEY_ID }}
65 changes: 35 additions & 30 deletions .github/workflows/test-exports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ env:
jobs:
exports-esbuild:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -33,17 +35,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-esm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -53,17 +56,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-cjs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -73,17 +77,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-cf:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -93,17 +98,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-vercel:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -113,17 +119,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-vite:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -133,17 +140,18 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

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

exports-tsc:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -153,11 +161,10 @@ jobs:
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn workspace langchain build

- name: Build dependencies
run: yarn build --filter=langchain --filter=@langchain/anthropic --filter=@langchain/community --filter=@langchain/openai
shell: bash
env:
SKIP_API_DOCS: true

- name: Test compiling exports with tsc
run: docker compose -f environment_tests/docker-compose.yml run test-exports-tsc
Expand All @@ -176,8 +183,6 @@ jobs:
# - name: Build
# run: yarn workspace langchain build
# shell: bash
# env:
# SKIP_API_DOCS: true

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

0 comments on commit d23e9f9

Please sign in to comment.