Skip to content

Commit 61c29fe

Browse files
committed
added working langgraph implementation
1 parent 92d184f commit 61c29fe

File tree

7 files changed

+1159
-340
lines changed

7 files changed

+1159
-340
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@ chatwithdelta is the typescript version of the cli tool, based on the ui provide
1313

1414
```bash
1515
# First time only
16-
npm install
16+
bun install
1717
```
1818

1919
```bash
2020
export EMAIL_TARGET="your_email"
2121
export SYSTEM_NAME="Delta"
2222
export UIUC_API_KEY="your_uiuc_api_key"
2323
export UIUC_COURSE_NAME="Delta-Documentation"
24-
npm run start
24+
export MODEL_URL="pre_hosted_uiuc.chat_llm_url"
25+
bun run start
2526
```
2627

2728
If you don't have an API key you can get one by creating an account at https://uiuc.chat and selecting the API tab were you can get your key.

bun.lock

Lines changed: 322 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chatwithDelta/package.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,20 @@
55
"bin": "dist/index.js",
66
"type": "module",
77
"engines": {
8-
"node": ">=16"
8+
"node": ">=16",
9+
"bun": ">=1.0.0"
910
},
1011
"scripts": {
11-
"dev": "ts-node-dev -r tsconfig-paths/register --respawn --no-pretty --exit-child src/index.tsx",
12-
"build": "tsc && chmod +x dist/index.js",
13-
"start": "npm run build && node dist/index.js",
14-
"pretest": "npm run build"
12+
"build": "bun build --target bun index.tsx --outdir dist",
13+
"start": "bun run src/index.tsx",
14+
"dev": "bun --watch src/index.tsx",
15+
"pretest": "bun run build"
1516
},
1617
"dependencies": {
18+
"@langchain/core": "^0.3.61",
19+
"@langchain/langgraph": "^0.3.5",
20+
"@langchain/community": "^0.3.47",
21+
"langchain": "^0.3.29",
1722
"@react-email/render": "^1.1.2",
1823
"@types/better-sqlite3": "^7.6.13",
1924
"better-sqlite3": "^11.10.0",
@@ -43,4 +48,4 @@
4348
"tsconfig-paths": "^4.2.0",
4449
"typescript": "^5.0.3"
4550
}
46-
}
51+
}

chatwithDelta/src/env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const envSchema = z.object({
55
SYSTEM_NAME: z.string(),
66
UIUC_API_KEY: z.string(),
77
UIUC_COURSE_NAME: z.string(),
8+
MODEL_URL: z.string(),
89
});
910

1011
// Log current environment variables
@@ -13,13 +14,16 @@ console.log('EMAIL_TARGET:', process.env['EMAIL_TARGET']);
1314
console.log('SYSTEM_NAME:', process.env['SYSTEM_NAME']);
1415
console.log('UIUC_COURSE_NAME:', process.env['UIUC_COURSE_NAME']);
1516
console.log('UIUC_API_KEY:', process.env['UIUC_API_KEY'] ? '***' : 'not set');
17+
console.log('MODEL_URL:', process.env['MODEL_URL'] ? '***' : 'not set');
1618

1719
// Only set defaults if environment variables are not already set
1820
if (!process.env['SYSTEM_NAME']) process.env['SYSTEM_NAME'] = 'Delta';
1921
if (!process.env['UIUC_COURSE_NAME']) process.env['UIUC_COURSE_NAME'] = 'Delta-Documentation';
2022
if (!process.env['EMAIL_TARGET']) process.env['EMAIL_TARGET'] = '[email protected]';
2123

24+
2225
/**
2326
* Parsed environment variables.
2427
*/
28+
2529
export const env = envSchema.parse(process.env);

0 commit comments

Comments
 (0)