forked from langchain-ai/langchainjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make openai classes use fetch, remove use of node-fetch (langchain-ai…
…#118), Convert library to ESM codebase, ESM output (langchain-ai#124), Add GH (manual) action for running integration tests (langchain-ai#119) * Use fetch adapter for openai axios * Remove node-fetch, add instructions for node 16 * Add GH (manual) action for running integration tests (langchain-ai#119) * Add integration tests GH action (manual trigger for now), reduce cost of integration tests by using smallest possible models * Convert library to ESM codebase, ESM output (langchain-ai#124) * Use fetch adapter for openai axios * Update tsc build to output ESM only * Update all import paths to have extension per ESM requirements * Move all source files to src/ * Remove circular dependency * Fix jest config for ESM * Remove circular deps not possible with ESM * Throw error in index getter to dedupe code and have safer usage (langchain-ai#35) * Fix hnsw for esm * Fix usage of hnswlib with index passed in * Fix textsplitter for esm * Fix openai for esm * Fix hf for esm * Fix ESM for cohere * Fix ESM for serpapi * Fix esm in srt * Remove dependency on @vespaiach/axios-fetch-adapter which has an incorrect export * Fix examples for esm * Fix entrypoints * Fix test-exports for esm * Add fetch flag for node 16 ci job * Add a more thorough test for packaging * Fix docs build --------- Co-authored-by: micahriggan <[email protected]> --------- Co-authored-by: micahriggan <[email protected]> * Fix one more import * Fix example * Also build docs in ci * Fix sql test in ci --------- Co-authored-by: micahriggan <[email protected]>
- Loading branch information
1 parent
fced19c
commit 1f7045a
Showing
145 changed files
with
1,244 additions
and
759 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 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: Node.js Integration Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
node-version: [16.x, 18.x] | ||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: "yarn" | ||
- name: Install dependencies | ||
run: yarn install --immutable | ||
- run: yarn run ci | ||
- run: yarn workspace langchain run test:integration |
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
File renamed without changes.
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
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 |
---|---|---|
@@ -1,39 +1,26 @@ | ||
agents.js | ||
agents.mjs | ||
agents.d.ts | ||
tools.js | ||
tools.mjs | ||
tools.d.ts | ||
chains.js | ||
chains.mjs | ||
chains.d.ts | ||
embeddings.js | ||
embeddings.mjs | ||
embeddings.d.ts | ||
llms.js | ||
llms.mjs | ||
llms.d.ts | ||
prompts.js | ||
prompts.mjs | ||
prompts.d.ts | ||
vectorstores.js | ||
vectorstores.mjs | ||
vectorstores.d.ts | ||
text_splitter.js | ||
text_splitter.mjs | ||
text_splitter.d.ts | ||
memory.js | ||
memory.mjs | ||
memory.d.ts | ||
document.js | ||
document.mjs | ||
document.d.ts | ||
docstore.js | ||
docstore.mjs | ||
docstore.d.ts | ||
document_loaders.js | ||
document_loaders.mjs | ||
document_loaders.d.ts | ||
index.js | ||
index.mjs | ||
index.d.ts |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,12 +1,13 @@ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: "ts-jest/presets/js-with-ts", | ||
preset: "ts-jest/presets/default-esm", | ||
testEnvironment: "node", | ||
modulePathIgnorePatterns: ["dist/", "docs/"], | ||
moduleNameMapper: { | ||
"^(\\.{1,2}/.*)\\.js$": "$1", | ||
}, | ||
transform: { | ||
"^.+\\.(ts|tsx)$": "ts-jest", | ||
"^.+\\.(js)$": "babel-jest", | ||
"^.+\\.m?[tj]sx?$": ["ts-jest", { useESM: true }], | ||
}, | ||
transformIgnorePatterns: [], | ||
setupFiles: ["dotenv/config"], | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.