Skip to content

Commit

Permalink
Merge branch 'maddy/use-langsmith-sdk-for-prompts' of github.com:lang…
Browse files Browse the repository at this point in the history
…chain-ai/langchainjs into maddy/use-langsmith-sdk-for-prompts
  • Loading branch information
madams0013 committed Aug 1, 2024
2 parents 201980a + 095d625 commit 0dfc276
Show file tree
Hide file tree
Showing 2,261 changed files with 149,413 additions and 85,508 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"name": "Node.js & TypeScript",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-20",
"image": "mcr.microsoft.com/devcontainers/typescript-node:1.1.0-20",
"customizations": {
"vscode": {
"extensions": [
Expand Down
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
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ contact_links:
- name: 🤔 Question or Problem
about: Ask a question or ask about a problem in GitHub Discussions.
url: https://www.github.com/langchain-ai/langchainjs/discussions/categories/q-a
- name: Discord
url: https://discord.gg/6adMQxSpJS
about: General community discussions
- name: Feature Request
url: https://www.github.com/langchain-ai/langchainjs/discussions/categories/ideas
about: Suggest a feature or an idea
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.

14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
# Do not run this workflow if only docs changed.
paths-ignore:
paths_ignore:
- 'docs/**'
- 'dependency_range_tests/**'
- 'environment_tests/**'
- '.github/**'
- '!.github/workflows/ci.yml'
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI


Expand Down Expand Up @@ -38,8 +39,3 @@ jobs:
run: yarn install --immutable --mode=skip-build
- name: Check linting
run: yarn run lint

test-exports:
uses:
./.github/workflows/test-exports.yml
secrets: inherit
239 changes: 232 additions & 7 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ on:
push:
branches: ["main"]
pull_request:
# Do not run this workflow if only docs changed.
paths-ignore:
- 'docs/**'
# Only run this workflow if the following directories have changed.
paths:
- '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,
Expand All @@ -23,12 +25,32 @@ 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.
jobs:
test-langchain-with-latest-deps:
get-changed-files:
runs-on: ubuntu-latest
outputs:
changed_files: ${{ steps.get_changes.outputs.changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Get changes
id: get_changes
run: |
echo "changed_files<<EOF" >> $GITHUB_OUTPUT
git diff --name-only -r HEAD^1 HEAD | while read line; do printf "%s\n" "$line"; done >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
# LangChain
langchain-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain/') || contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-openai/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-textsplitters/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -37,10 +59,12 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Test LangChain with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run test-langchain-with-latest-deps
run: docker compose -f dependency_range_tests/docker-compose.yml run langchain-latest-deps

test-langchain-with-lowest-deps:
langchain-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
Expand All @@ -49,4 +73,205 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Test LangChain with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run test-langchain-with-lowest-deps
run: docker compose -f dependency_range_tests/docker-compose.yml run langchain-lowest-deps

# Community
community-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-openai/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-community/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/community` with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run community-latest-deps

community-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-community/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/community` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run community-lowest-deps

community-npm-install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test npm install on `@langchain/community`
run: docker compose -f dependency_range_tests/docker-compose.yml run community-npm-install

# OpenAI
openai-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-openai/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/openai` with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run openai-latest-deps

openai-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-openai/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/openai` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run openai-lowest-deps

# Anthropic
anthropic-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-anthropic/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/anthropic` with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run anthropic-latest-deps

anthropic-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-anthropic/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/anthropic` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run anthropic-lowest-deps

# Google VertexAI
google-vertexai-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-google-vertexai/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-google-gauth/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-google-common/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/google-vertexai` with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run google-vertexai-latest-deps

google-vertexai-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-google-vertexai/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/google-vertexai` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run google-vertexai-lowest-deps

# Cohere
cohere-latest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'langchain-core/') || contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-cohere/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/cohere` with latest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run cohere-latest-deps

cohere-lowest-deps:
runs-on: ubuntu-latest
needs: get-changed-files
if: contains(needs.get-changed-files.outputs.changed_files, 'libs/langchain-cohere/')
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable
- name: Build `@langchain/standard-tests`
run: yarn build --filter=@langchain/standard-tests
- name: Test `@langchain/cohere` with lowest deps
run: docker compose -f dependency_range_tests/docker-compose.yml run cohere-lowest-deps
Loading

0 comments on commit 0dfc276

Please sign in to comment.