Skip to content

Commit d47fe85

Browse files
Merge pull request #124 from Turing-Sandbox/feature/ai-module
Feature/ai module
2 parents c0d1bb9 + 8373bde commit d47fe85

39 files changed

+438
-3203
lines changed

backend/.env.sample

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,7 @@ ALGOLIA_INDEX_NAME=...
3333
STRIPE_SECRET_KEY=...
3434
STRIPE_WEBHOOK_SECRET=...
3535
STRIPE_PRICE_ID=...
36-
STRIPE_TEST_MODE=true
36+
STRIPE_TEST_MODE=true
37+
38+
# Gemini configuration
39+
GEMINI_API_KEY=...

backend/jest.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ module.exports = {
1111
transformIgnorePatterns: [
1212
'/node_modules/'
1313
],
14+
testPathIgnorePatterns: [
15+
'/node_modules/',
16+
'/dist/'
17+
],
1418
verbose: true,
1519
testTimeout: 30000
1620
};

backend/package.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"description": "Summarizz backend server",
55
"main": "server.ts",
66
"scripts": {
7+
"build": "tsc",
78
"start": "tsc && node dist/src/server.js",
89
"dev": "nodemon --watch 'src/**/*.ts' --exec ts-node src/server.ts",
910
"lint": "eslint . --ext .ts",
10-
"test": "jest"
11+
"test": "jest",
12+
"test:verbose": "jest --verbose"
1113
},
1214
"author": "",
1315
"license": "ISC",
@@ -32,9 +34,11 @@
3234
},
3335
"dependencies": {
3436
"@algolia/client-search": "^5.20.4",
37+
"@google/generative-ai": "^0.24.1",
38+
"@langchain/core": "^0.3.57",
3539
"@types/jsonwebtoken": "^9.0.7",
3640
"algoliasearch": "^4.24.0",
37-
"axios": "^1.7.7",
41+
"axios": "^1.9.0",
3842
"compression": "^1.8.0",
3943
"cookie-parser": "^1.4.7",
4044
"cors": "^2.8.5",
@@ -46,7 +50,7 @@
4650
"formidable": "^3.5.2",
4751
"helmet": "^8.1.0",
4852
"jsonwebtoken": "^9.0.2",
49-
"stripe": "^18.0.0",
53+
"stripe": "^18.1.1",
5054
"winston": "^3.17.0",
5155
"zod": "^3.24.4"
5256
}

backend/src/app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import notificationRoutes from './modules/notification/routes/notification.route
1515
import oauthRoutes from './modules/user/routes/oauth.routes';
1616
import webhookRoutes from './modules/subscription/routes/webhook.routes';
1717
import searchRoutes from './modules/search/routes/search.routes';
18-
// import summarizationRoutes from './modules/ai/routes/summarization.routes';
18+
import summarizationRoutes from './modules/ai/routes/summarization.routes';
1919

2020

2121
const app = express();
@@ -60,7 +60,7 @@ app.use('/notification', notificationRoutes);
6060
app.use('/oauth', oauthRoutes);
6161
app.use('/webhook', webhookRoutes);
6262
app.use('/search', searchRoutes);
63-
// app.use('/ai', summarizationRoutes);
63+
app.use('/ai', summarizationRoutes);
6464

6565
app.get('/', (_, res) => {
6666
res.send('Server is Listening!');

backend/src/modules/ai/.env.sample

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

backend/src/modules/ai/Dockerfile

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

backend/src/modules/ai/Makefile

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

backend/src/modules/ai/app.py

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

backend/src/modules/ai/blueprints/auth.py

Whitespace-only changes.

backend/src/modules/ai/blueprints/general.py

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

0 commit comments

Comments
 (0)