Skip to content

Commit 92b8bb6

Browse files
authored
Merge pull request #481 from mayooear/feat/langgraph-rag-agent
This monorepo is a customizable template example of an AI agent chatbot that ingests PDF documents, stores embeddings in a vector database (Supabase), and then answers user queries using OpenAI (or another LLM provider) utilising LangChain and LangGraph as orchestration frameworks. This template is also an example template associated with the book Learning LangChain (O'Reilly): Building AI and LLM applications with LangChain and LangGraph.
2 parents 0ccc8b3 + 5cb1c6c commit 92b8bb6

File tree

147 files changed

+32722
-7508
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+32722
-7508
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
dist

.env.example

Lines changed: 0 additions & 8 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/* .eslintrc.cjs */
2+
3+
module.exports = {
4+
root: true, // Ensures ESLint doesn't look beyond this folder for configuration
5+
parser: '@typescript-eslint/parser', // Tells ESLint to parse TypeScript
6+
parserOptions: {
7+
ecmaVersion: 'latest', // Enables modern JavaScript features
8+
sourceType: 'module', // Allows import/export statements,
9+
project: './tsconfig.json', // Tells ESLint to use the tsconfig.json file
10+
},
11+
extends: [
12+
'eslint:recommended', // Basic ESLint rules
13+
'plugin:@typescript-eslint/recommended', // Adds TypeScript-specific rules
14+
'prettier', // Disables rules conflicting with Prettier
15+
],
16+
ignorePatterns: [
17+
'.eslintrc.cjs',
18+
'scripts',
19+
'src/utils/lodash/*',
20+
'node_modules',
21+
'dist',
22+
'dist-cjs',
23+
'*.js',
24+
'*.cjs',
25+
'*.d.ts',
26+
],
27+
rules: {
28+
// You can add or override any rules here, for example:
29+
// "no-console": "warn", // Warn when using console.log
30+
},
31+
};

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Run formatting on all PRs
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+
format:
19+
name: Check formatting
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js 18.x
24+
uses: actions/setup-node@v3
25+
with:
26+
node-version: 18.x
27+
cache: "yarn"
28+
- name: Install dependencies
29+
run: yarn install --immutable --mode=skip-build
30+
- name: Check formatting
31+
run: yarn format:check
32+
33+
lint:
34+
name: Check linting
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Use Node.js 18.x
39+
uses: actions/setup-node@v3
40+
with:
41+
node-version: 18.x
42+
cache: "yarn"
43+
- name: Install dependencies
44+
run: yarn install --immutable --mode=skip-build
45+
- name: Check linting
46+
run: yarn run lint:all

.gitignore

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
1-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2-
3-
# dependencies
4-
/node_modules
5-
/.pnp
6-
.pnp.js
7-
8-
# testing
9-
/coverage
10-
11-
# next.js
12-
/.next/
13-
/out/
14-
15-
# production
16-
/build
1+
# npm
2+
node_modules/
173

184
# misc
195
.DS_Store
@@ -23,20 +9,45 @@
239
npm-debug.log*
2410
yarn-debug.log*
2511
yarn-error.log*
26-
.pnpm-debug.log*
12+
ui-debug.log*
2713

2814
# local env files
2915
.env*.local
30-
.env
16+
17+
# typescript
18+
*.tsbuildinfo
3119

3220
# vercel
3321
.vercel
3422

35-
# typescript
36-
*.tsbuildinfo
37-
next-env.d.ts
23+
# testing
24+
coverage
25+
26+
# next.js
27+
.next/
28+
out/
29+
30+
# fumadocs
31+
.source
32+
33+
# production
34+
build
35+
dist
36+
apps/docs/public/registry/
37+
38+
# turbo
39+
.turbo
40+
41+
# env
42+
.env
43+
44+
# cursor
45+
.cursor
46+
.cursor/
47+
48+
#llm_context
49+
llm_context/
3850

39-
#Notion_db
40-
/Notion_DB
51+
test_docs
4152

42-
.yarn/
53+
.swc

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 [Your Name or Organization Name]
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)