Skip to content

Commit

Permalink
Merge pull request #481 from mayooear/feat/langgraph-rag-agent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mayooear authored Feb 20, 2025
2 parents 0ccc8b3 + 5cb1c6c commit 92b8bb6
Show file tree
Hide file tree
Showing 147 changed files with 32,722 additions and 7,508 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
8 changes: 0 additions & 8 deletions .env.example

This file was deleted.

31 changes: 31 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* .eslintrc.cjs */

module.exports = {
root: true, // Ensures ESLint doesn't look beyond this folder for configuration
parser: '@typescript-eslint/parser', // Tells ESLint to parse TypeScript
parserOptions: {
ecmaVersion: 'latest', // Enables modern JavaScript features
sourceType: 'module', // Allows import/export statements,
project: './tsconfig.json', // Tells ESLint to use the tsconfig.json file
},
extends: [
'eslint:recommended', // Basic ESLint rules
'plugin:@typescript-eslint/recommended', // Adds TypeScript-specific rules
'prettier', // Disables rules conflicting with Prettier
],
ignorePatterns: [
'.eslintrc.cjs',
'scripts',
'src/utils/lodash/*',
'node_modules',
'dist',
'dist-cjs',
'*.js',
'*.cjs',
'*.d.ts',
],
rules: {
// You can add or override any rules here, for example:
// "no-console": "warn", // Warn when using console.log
},
};
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Run formatting on all PRs

name: CI

on:
push:
branches: ["main"]
pull_request:
workflow_dispatch: # Allows triggering the workflow manually in GitHub UI

# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Check formatting
run: yarn format:check

lint:
name: Check linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Check linting
run: yarn run lint:all
59 changes: 35 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build
# npm
node_modules/

# misc
.DS_Store
Expand All @@ -23,20 +9,45 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
ui-debug.log*

# local env files
.env*.local
.env

# typescript
*.tsbuildinfo

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
# testing
coverage

# next.js
.next/
out/

# fumadocs
.source

# production
build
dist
apps/docs/public/registry/

# turbo
.turbo

# env
.env

# cursor
.cursor
.cursor/

#llm_context
llm_context/

#Notion_db
/Notion_DB
test_docs

.yarn/
.swc
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 [Your Name or Organization Name]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 92b8bb6

Please sign in to comment.