Skip to content

Commit

Permalink
Merge branch 'main' into brace/export-types
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul authored Nov 8, 2024
2 parents 6a960f5 + a8cab88 commit 90f660b
Show file tree
Hide file tree
Showing 79 changed files with 10,705 additions and 2,131 deletions.
9 changes: 3 additions & 6 deletions .github/actions/js-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@ inputs:
node-version:
description: "Node version"
required: true
langchain-api-key:
langchain-api-key-beta:
description: "Langchain"
required: true
langchain-endpoint:
description: "LangSmith Endpoint"
required: true
openai-api-key:
description: "OpenAI API key"
required: false
Expand Down Expand Up @@ -37,6 +34,6 @@ runs:
working-directory: js
env:
LANGCHAIN_TRACING_V2: "true"
LANGCHAIN_ENDPOINT: ${{ inputs.langchain-endpoint }}
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key }}
LANGCHAIN_ENDPOINT: https://beta.api.smith.langchain.com
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key-beta }}
OPENAI_API_KEY: ${{ inputs.openai-api-key }}
23 changes: 13 additions & 10 deletions .github/actions/python-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ inputs:
python-version:
description: "Python version"
required: true
langchain-api-key:
description: "Langchain"
langchain-api-key-beta:
description: "LangSmith Beta Key"
required: true
langchain-endpoint:
description: "LangSmith Endpoint"
langchain-api-key-prod:
description: "LangSmith Key"
required: true
openai-api-key:
description: "OpenAI API key"
Expand Down Expand Up @@ -43,20 +43,22 @@ runs:
- name: Run integration tests
env:
LANGCHAIN_TRACING_V2: "true"
LANGCHAIN_ENDPOINT: ${{ inputs.langchain-endpoint }}
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key }}
LANGCHAIN_ENDPOINT: https://beta.api.smith.langchain.com
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key-beta }}
OPENAI_API_KEY: ${{ inputs.openai-api-key }}
LANGSMITH_TEST_CACHE: tests/cassettes
run: make integration_tests_fast
shell: bash
working-directory: python

- name: Run doctest
env:
LANGCHAIN_TRACING_V2: "true"
LANGCHAIN_ENDPOINT: ${{ inputs.langchain-endpoint }}
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key }}
LANGCHAIN_ENDPOINT: https://api.smith.langchain.com
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key-prod }}
OPENAI_API_KEY: ${{ inputs.openai-api-key }}
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
LANGSMITH_TEST_CACHE: tests/cassettes
run: make doctest
shell: bash
working-directory: python
Expand All @@ -65,10 +67,11 @@ runs:
- name: Run Evaluation
env:
LANGCHAIN_TRACING_V2: "true"
LANGCHAIN_ENDPOINT: ${{ inputs.langchain-endpoint }}
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key }}
LANGCHAIN_ENDPOINT: https://beta.api.smith.langchain.com
LANGCHAIN_API_KEY: ${{ inputs.langchain-api-key-beta }}
OPENAI_API_KEY: ${{ inputs.openai-api-key }}
ANTHROPIC_API_KEY: ${{ inputs.anthropic-api-key }}
LANGSMITH_TEST_CACHE: tests/cassettes
run: make evals
shell: bash
working-directory: python
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
- name: Install dependencies
run: |
poetry install --with dev
poetry run pip install -U langchain langchain_anthropic langchain_openai rapidfuzz
poetry run pip install -U langchain langchain_anthropic langchain_openai rapidfuzz pandas
- name: Run Python integration tests
uses: ./.github/actions/python-integration-tests
with:
python-version: 3.11
langchain-endpoint: https://api.smith.langchain.com
langchain-api-key: ${{ secrets.LANGSMITH_API_KEY }}
langchain-api-key-beta: ${{ secrets.LANGSMITH_API_KEY_BETA }}
langchain-api-key-prod: ${{ secrets.LANGSMITH_API_KEY_PROD }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
anthropic-api-key: ${{ secrets.ANTHROPIC_API_KEY }}

Expand Down Expand Up @@ -76,6 +76,5 @@ jobs:
uses: ./.github/actions/js-integration-tests
with:
node-version: 20.x
langchain-endpoint: https://api.smith.langchain.com
langchain-api-key: ${{ secrets.LANGSMITH_API_KEY }}
langchain-api-key-beta: ${{ secrets.LANGSMITH_API_KEY_BETA }}
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
13 changes: 12 additions & 1 deletion js/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,18 @@ module.exports = {
"@typescript-eslint/no-shadow": 0,
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
"@typescript-eslint/no-unused-vars": ["warn", { args: "none" }],
"@typescript-eslint/no-unused-vars": [
"warn",
{
args: "none",
argsIgnorePattern: "^_",
caughtErrors: "all",
caughtErrorsIgnorePattern: "^_",
destructuredArrayIgnorePattern: "^_",
varsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
camelcase: 0,
Expand Down
4 changes: 4 additions & 0 deletions js/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ Chinook_Sqlite.sql
/langchain.js
/langchain.d.ts
/langchain.d.cts
/vercel.cjs
/vercel.js
/vercel.d.ts
/vercel.d.cts
/wrappers.cjs
/wrappers.js
/wrappers.d.ts
Expand Down
31 changes: 23 additions & 8 deletions js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langsmith",
"version": "0.1.62",
"version": "0.2.4",
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
"packageManager": "[email protected]",
"files": [
Expand Down Expand Up @@ -33,6 +33,10 @@
"langchain.js",
"langchain.d.ts",
"langchain.d.cts",
"vercel.cjs",
"vercel.js",
"vercel.d.ts",
"vercel.d.cts",
"wrappers.cjs",
"wrappers.js",
"wrappers.d.ts",
Expand Down Expand Up @@ -105,18 +109,20 @@
"uuid": "^10.0.0"
},
"devDependencies": {
"@ai-sdk/openai": "^0.0.40",
"@ai-sdk/openai": "^0.0.68",
"@babel/preset-env": "^7.22.4",
"@faker-js/faker": "^8.4.1",
"@jest/globals": "^29.5.0",
"@langchain/core": "^0.3.1",
"@langchain/langgraph": "^0.2.3",
"@langchain/openai": "^0.3.0",
"@langchain/core": "^0.3.14",
"@langchain/langgraph": "^0.2.18",
"@langchain/openai": "^0.3.11",
"@opentelemetry/sdk-trace-base": "^1.26.0",
"@opentelemetry/sdk-trace-node": "^1.26.0",
"@tsconfig/recommended": "^1.0.2",
"@types/jest": "^29.5.1",
"@typescript-eslint/eslint-plugin": "^5.59.8",
"@typescript-eslint/parser": "^5.59.8",
"ai": "^3.2.37",
"ai": "^3.4.17",
"babel-jest": "^29.5.0",
"cross-env": "^7.0.3",
"dotenv": "^16.1.3",
Expand All @@ -126,8 +132,8 @@
"eslint-plugin-no-instanceof": "^1.0.1",
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"langchain": "^0.3.2",
"openai": "^4.38.5",
"langchain": "^0.3.3",
"openai": "^4.67.3",
"prettier": "^2.8.8",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
Expand Down Expand Up @@ -221,6 +227,15 @@
"import": "./langchain.js",
"require": "./langchain.cjs"
},
"./vercel": {
"types": {
"import": "./vercel.d.ts",
"require": "./vercel.d.cts",
"default": "./vercel.d.ts"
},
"import": "./vercel.js",
"require": "./vercel.cjs"
},
"./wrappers": {
"types": {
"import": "./wrappers.d.ts",
Expand Down
1 change: 1 addition & 0 deletions js/scripts/create-entrypoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const entrypoints = {
"evaluation/langchain": "evaluation/langchain",
schemas: "schemas",
langchain: "langchain",
vercel: "vercel",
wrappers: "wrappers/index",
anonymizer: "anonymizer/index",
"wrappers/openai": "wrappers/openai",
Expand Down
Loading

0 comments on commit 90f660b

Please sign in to comment.