New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable support for Browsers, Cloudflare Workers, Next.js Browser/Serverless/Edge #632
Merged
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
8b2cd13
Add test-exports-cf package to test using LangChain on Cloudflare Wor…
nfcampos b899fb3
Add readme
nfcampos 541be01
Remove wrangler from root package
nfcampos a407078
Add support for lite entrypoints
nfcampos 40b3c42
Improve the test
nfcampos ff4228c
Replace usage of is-binary-path because it uses node:path
nfcampos f55a1da
Add a try:catch around fs import in unstructured loader
nfcampos 7f88a59
Move extname to its own file
nfcampos ef3fcb6
Fix lite entrypoint definition, add 2 more lite entrypoints
nfcampos 0d40202
More thorough cf test
nfcampos 56082bd
Finish setting up test-exports-cf package scripts
nfcampos c721a5f
Add sideEffects flag
nfcampos 0f64067
Update setup instructions for csv loader
nfcampos 722d052
Update entrypoints
nfcampos 2fdb457
More thorough test
nfcampos 9085258
Fix entrypoints, types needs to contain the full interface, othewise …
nfcampos a566b2b
Remove fs/load functionality from lite entrypoints
nfcampos 241480d
Run build
nfcampos 7b73ae1
Prevent typeorm from being included in every bundle
nfcampos bd0033c
Reorganise document loaders, remove any document loaders that use fil…
nfcampos 03cdb5f
Nc/test exports browser (#652)
nfcampos a145858
Lint
nfcampos 03dc9b6
Fix d3-dsv install instruction
nfcampos 722e3c8
Rename test-exports to test-exports-esm
nfcampos 73eb914
Add missing deps in test-exports-esm
nfcampos ef89125
Add command to run export tests with docker
nfcampos 64074f9
Add test:exports:docker to CI
nfcampos 0ece50b
Make tiktoken a required dependency
nfcampos e649df6
Rename CI workflow
nfcampos c50cd2e
Remove yaml dependency from prompts entrypoint
nfcampos 7ebfbbe
If tiktoken fails fallback to approx count
nfcampos a5c854f
Fix cra test
nfcampos 41eef02
Place load functions into separate /load entrypoints
nfcampos 503808f
Fix more index imports
nfcampos e180f36
Create granular entrypoints for /embeddings
nfcampos 1e60f75
Add note
nfcampos a5ad8b8
Add mroe comments
nfcampos b2aef79
Remove test for node-only exports
nfcampos d0cf418
Try to fix test in ci in windows
nfcampos 2472c40
Create granular entrypoints for /llms
nfcampos cab09f5
Add granular entrypoints for /chat_models
nfcampos 74a07e1
Remove internal things from generated docs
nfcampos c5b318a
Update typedoc
nfcampos 93a589b
Move src/agents/tools to src/tools/
nfcampos b611e41
Add generated entrypoint test files
nfcampos 345a1f1
Move /vectorstores to granular entrypoints
nfcampos 1340ceb
Update after rebase
nfcampos b156d8c
Move /retrievers to granular endpoints
nfcampos 632d07b
Move /document_loaders to granular entrypoints
nfcampos 7ad4ae3
Merge pull request #682 from hwchase17/nc/granular-entrypoints
nfcampos b3b850d
Lint
nfcampos a5f09fe
Add package to test exports on vercel / next.js
nfcampos eb9dc11
Move Calculator tool to its own entrypoint because Vercel Edge doesn'…
nfcampos 240c156
Add streaming to vercel edge example
nfcampos 99e4cdc
Add vercel nextjs frontend example
nfcampos 516caed
Add vercel to env tests
nfcampos edaf1ae
Update install instructions
nfcampos 98fa8c9
Update pinecone peer dep
nfcampos b820770
Finish update pinecone peer dep
nfcampos 4ba8535
Fix publish command
nfcampos c311c6c
Release 0.0.52-0
nfcampos 320f9fb
Merge branch 'main' into nc/test-exports-cf
nfcampos 5987015
Add install instructions for vercel
nfcampos 15e132d
Add update instructions
nfcampos bde2c97
Reword vercel instructions
nfcampos b97c1d4
Import entrypoints file in vercel frontend
nfcampos 3f3cdd3
Add deprecation notice to deprecated entrypoints, update remaining do…
nfcampos 51fcf1f
Update tiktoken
nfcampos 1f8df25
Update anthropic sdk
nfcampos 7b0bde0
Update import paths in integrations tests
nfcampos 09bb7ae
Remove unused dev deps
nfcampos 9cb6171
Add back zod in examples deps because of eslint
nfcampos 9fd3a6c
Merge branch 'main' into nc/test-exports-cf
agola11 fc0f5ef
Code review
nfcampos 48a7ef9
Update upgrade instructions
nfcampos dce825d
Update pdf loader docs
nfcampos e728224
Add test-exports-vite, update docusaurus
nfcampos 0ae48ef
Add Deno section
nfcampos 7deaaed
Merge pull request #705 from hwchase17/nc/env-docs
nfcampos 16d214a
Merge branch 'main' into nc/test-exports-cf
nfcampos 299d647
Add node-only labels to docs
nfcampos 9245c7b
Add one more alternative for loading PDFLoader
nfcampos 3369f7d
Smaller node label in docs sidebar
nfcampos File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
version: '3' | ||
services: | ||
test-exports-esm: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-esm:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
test-exports-cjs: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-cjs:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
test-exports-cra: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-cra:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
test-exports-cf: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-cf:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
test-exports-vercel: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-vercel:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
test-exports-vite: | ||
image: node:18 | ||
working_dir: /app | ||
volumes: | ||
- ./test-exports-vite:/package | ||
- ./langchain:/langchain | ||
- ./scripts:/scripts | ||
command: bash /scripts/docker-ci-entrypoint.sh | ||
success: | ||
image: alpine:3.14 | ||
command: echo "Success" | ||
depends_on: | ||
test-exports-esm: | ||
condition: service_completed_successfully | ||
test-exports-cjs: | ||
condition: service_completed_successfully | ||
test-exports-cra: | ||
condition: service_completed_successfully | ||
test-exports-cf: | ||
condition: service_completed_successfully | ||
test-exports-vercel: | ||
condition: service_completed_successfully | ||
test-exports-vite: | ||
condition: service_completed_successfully |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate CI job for the environment tests using docker
The environment tests are essentially templates of the various environments people can use LangChain in
The docker test ensures that each environment's own build and test scripts pass