Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/langchain-ai/langchainjs in…
Browse files Browse the repository at this point in the history
…to main-callbacks
  • Loading branch information
FilipZmijewski committed Dec 4, 2024
2 parents 77bc889 + 0c2ff0e commit db3cd1b
Show file tree
Hide file tree
Showing 64 changed files with 3,331 additions and 252 deletions.
11 changes: 2 additions & 9 deletions .github/contributing/INTEGRATIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,9 @@ Above, we have a document loader that we're sure will always require a specific

We highly appreciate documentation and integration tests showing how to set up and use your integration. Providing this will make it much easier for reviewers to verify that your integration works and will streamline the review process.

New docs pages should be added as `.mdx` files in the appropriate location under `docs/` (`.mdx` is an extended markdown format that allows use of additional statements like `import`). Code examples within docs pages should be under `examples` and imported like this:
New docs pages should be added as the appropriate template from here:

```md
import CodeBlock from "@theme/CodeBlock";
import LangCoExample from "@examples/document_loaders/langco.ts";

<CodeBlock language="typescript">{LangCoExample}</CodeBlock>
```

This allows the linter and formatter to pick up example code blocks within docs as well.
https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-scripts/src/cli/docs/templates

### Linting and formatting

Expand Down
52 changes: 26 additions & 26 deletions dependency_range_tests/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3"
services:
# LangChain
langchain-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
Expand All @@ -13,7 +13,7 @@ services:
- ./scripts:/scripts
command: bash /scripts/langchain/test-with-latest-deps.sh
langchain-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
Expand All @@ -23,166 +23,166 @@ services:
- ../langchain:/langchain
- ./scripts:/scripts
command: bash /scripts/langchain/test-with-lowest-deps.sh

# Community
community-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/community/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-community:/libs/langchain-community
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/community/test-with-latest-deps.sh
community-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/community/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-community:/libs/langchain-community
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/community/test-with-lowest-deps.sh
community-npm-install:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/community/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-community:/libs/langchain-community
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/community/npm-install.sh

# OpenAI
openai-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/openai/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-openai:/libs/langchain-openai
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/openai/test-with-latest-deps.sh
openai-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/openai/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-openai:/libs/langchain-openai
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/openai/test-with-lowest-deps.sh

# Anthropic
anthropic-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/anthropic/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-anthropic:/libs/langchain-anthropic
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/anthropic/test-with-latest-deps.sh
anthropic-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/anthropic/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-anthropic:/libs/langchain-anthropic
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/anthropic/test-with-lowest-deps.sh

# Google VertexAI
google-vertexai-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/google-vertexai/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-google-vertexai:/libs/langchain-google-vertexai
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/google-vertexai/test-with-latest-deps.sh
google-vertexai-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/google-vertexai/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-google-vertexai:/libs/langchain-google-vertexai
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/google-vertexai/test-with-lowest-deps.sh

# Cohere
cohere-latest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/cohere/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-cohere:/libs/langchain-cohere
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/cohere/test-with-latest-deps.sh
cohere-lowest-deps:
image: node:18
image: node:20
environment:
PUPPETEER_SKIP_DOWNLOAD: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "true"
COHERE_API_KEY: ${COHERE_API_KEY}
working_dir: /app
volumes:
- ../turbo.json:/turbo.json
- ../package.json:/package.json
- ./scripts/with_standard_tests/cohere/node/package.json:/package.json
- ../libs/langchain-standard-tests:/libs/langchain-standard-tests
- ../libs/langchain-cohere:/libs/langchain-cohere
- ./scripts:/scripts
command: bash /scripts/with_standard_tests/cohere/test-with-lowest-deps.sh
command: bash /scripts/with_standard_tests/cohere/test-with-lowest-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {
"semver": "^7.5.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ node "update_resolutions_latest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/anthropic` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ node "update_resolutions_lowest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/anthropic` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {
"semver": "^7.5.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_latest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/cohere` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_lowest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/cohere` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {
"semver": "^7.5.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_latest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/community` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_lowest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/package` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {
"semver": "^7.5.4"
}
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ node "update_resolutions_latest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
cat ./package.json
yarn

# Navigate into `@langchain/google-vertexai` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_lowest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/package` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@
"name": "dependency-range-tests",
"version": "0.0.0",
"private": true,
"workspaces": [
"libs/*"
],
"description": "Tests dependency ranges for LangChain.",
"dependencies": {
"semver": "^7.5.4"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_latest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/openai` to build and run tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ node "update_resolutions_lowest.js"

# Navigate back to monorepo root and install dependencies
cd "$monorepo_dir"
touch yarn.lock
yarn

# Navigate into `@langchain/package` to build and run tests
Expand Down
Loading

0 comments on commit db3cd1b

Please sign in to comment.