Skip to content

Commit 4f32809

Browse files
committed
Initial commit
0 parents  commit 4f32809

26 files changed

+7049
-0
lines changed

.codespellignore

Whitespace-only changes.

.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
TAVILY_API_KEY=...
2+
3+
# To separate your traces from other application
4+
LANGCHAIN_PROJECT=data-enrichment
5+
# LANGCHAIN_API_KEY=...
6+
# LANGCHAIN_TRACING_V2=true
7+
8+
# The following depend on your selected configuration
9+
10+
## LLM choice:
11+
ANTHROPIC_API_KEY=....
12+
FIREWORKS_API_KEY=...
13+
OPENAI_API_KEY=...

.eslintrc.cjs

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
module.exports = {
2+
extends: [
3+
"eslint:recommended",
4+
"prettier",
5+
"plugin:@typescript-eslint/recommended",
6+
],
7+
parserOptions: {
8+
ecmaVersion: 12,
9+
parser: "@typescript-eslint/parser",
10+
project: "./tsconfig.json",
11+
sourceType: "module",
12+
},
13+
plugins: ["import", "@typescript-eslint", "no-instanceof"],
14+
ignorePatterns: [
15+
".eslintrc.cjs",
16+
"scripts",
17+
"node_modules",
18+
"dist",
19+
"dist-cjs",
20+
"*.js",
21+
"*.cjs",
22+
"*.d.ts",
23+
],
24+
rules: {
25+
"no-process-env": 0,
26+
"no-instanceof/no-instanceof": 2,
27+
"@typescript-eslint/explicit-module-boundary-types": 0,
28+
"@typescript-eslint/no-empty-function": 0,
29+
"@typescript-eslint/no-non-null-assertion": 0,
30+
"@typescript-eslint/no-shadow": 0,
31+
"@typescript-eslint/no-empty-interface": 0,
32+
"@typescript-eslint/no-use-before-define": ["error", "nofunc"],
33+
"@typescript-eslint/no-unused-vars": ["warn", { args: "none" }],
34+
"@typescript-eslint/no-floating-promises": "error",
35+
"@typescript-eslint/no-misused-promises": "error",
36+
camelcase: 0,
37+
"class-methods-use-this": 0,
38+
"import/extensions": [2, "ignorePackages"],
39+
"import/no-extraneous-dependencies": [
40+
"error",
41+
{ devDependencies: ["**/*.test.ts"] },
42+
],
43+
"import/no-unresolved": 0,
44+
"import/prefer-default-export": 0,
45+
"keyword-spacing": "error",
46+
"max-classes-per-file": 0,
47+
"max-len": 0,
48+
"no-await-in-loop": 0,
49+
"no-bitwise": 0,
50+
"no-console": 0,
51+
"no-restricted-syntax": 0,
52+
"no-shadow": 0,
53+
"no-continue": 0,
54+
"no-underscore-dangle": 0,
55+
"no-use-before-define": 0,
56+
"no-useless-constructor": 0,
57+
"no-return-await": 0,
58+
"consistent-return": 0,
59+
"no-else-return": 0,
60+
"new-cap": ["error", { properties: false, capIsNew: false }],
61+
},
62+
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This workflow will run integration tests for the current project once per day
2+
3+
name: Integration Tests
4+
5+
on:
6+
schedule:
7+
- cron: "37 14 * * *" # Run at 7:37 AM Pacific Time (14:37 UTC) every day
8+
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
9+
10+
# If another scheduled run starts while this workflow is still running,
11+
# cancel the earlier run in favor of the next run.
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
integration-tests:
18+
name: Integration Tests
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest]
22+
node-version: [20.x]
23+
runs-on: ${{ matrix.os }}
24+
steps:
25+
- uses: actions/checkout@v4
26+
- name: Use Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
cache: "yarn"
31+
- name: Install dependencies
32+
run: yarn install --immutable
33+
- name: Build project
34+
run: yarn build
35+
- name: Run integration tests
36+
env:
37+
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
38+
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
39+
run: yarn test:int

.github/workflows/unit-tests.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# This workflow will run unit tests for the current project
2+
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: ["main"]
8+
pull_request:
9+
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI
10+
11+
# If another push to the same PR or branch happens while this workflow is still running,
12+
# cancel the earlier run in favor of the next run.
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
unit-tests:
19+
name: Unit Tests
20+
strategy:
21+
matrix:
22+
os: [ubuntu-latest]
23+
node-version: [18.x, 20.x]
24+
runs-on: ${{ matrix.os }}
25+
steps:
26+
- uses: actions/checkout@v4
27+
- name: Use Node.js ${{ matrix.node-version }}
28+
uses: actions/setup-node@v3
29+
with:
30+
node-version: ${{ matrix.node-version }}
31+
cache: "yarn"
32+
- name: Install dependencies
33+
run: yarn install --immutable
34+
- name: Build project
35+
run: yarn build
36+
37+
- name: Lint project
38+
run: yarn lint:all
39+
40+
- name: Check README spelling
41+
uses: codespell-project/actions-codespell@v2
42+
with:
43+
ignore_words_file: .codespellignore
44+
path: README.md
45+
46+
- name: Check code spelling
47+
uses: codespell-project/actions-codespell@v2
48+
with:
49+
ignore_words_file: .codespellignore
50+
path: src/
51+
52+
- name: Run tests
53+
env:
54+
ANTHROPIC_API_KEY: afakekey
55+
TAVILY_API_KEY: anotherfakekey
56+
run: yarn test

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
index.cjs
2+
index.js
3+
index.d.ts
4+
node_modules
5+
dist
6+
.yarn/*
7+
!.yarn/patches
8+
!.yarn/plugins
9+
!.yarn/releases
10+
!.yarn/sdks
11+
!.yarn/versions
12+
13+
.turbo
14+
**/.turbo
15+
**/.eslintcache
16+
17+
.env
18+
.ipynb_checkpoints
19+

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 LangChain
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)