Skip to content

Commit 0f6d783

Browse files
committed
updates
1 parent dff745e commit 0f6d783

File tree

4 files changed

+11
-515
lines changed

4 files changed

+11
-515
lines changed

client/Chat.jsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useState } from 'react';
22
import { chatServices } from './services/chat-services';
3-
import { Grid, CircularProgress, Typography, List, ListItem, Button } from '@mui/material';
3+
import { Grid, CircularProgress, Typography, Button } from '@mui/material';
44
import { KeyboardReturn } from '@mui/icons-material';
55

66
const styles = {
@@ -39,7 +39,6 @@ const Chat = () => {
3939
try {
4040
setLoading(true);
4141
const response = await chatServices.chatWithLLM({ userInput });
42-
console.log({response})
4342
setAnswer(response);
4443
} catch (err) {
4544
setError(err);
@@ -55,7 +54,6 @@ const Chat = () => {
5554

5655
const handleFileUpload = async () => {
5756
if (selectedFile) {
58-
// Perform the upload logic here
5957
try {
6058
setLoading(true);
6159
const form = new FormData();
@@ -66,8 +64,8 @@ const Chat = () => {
6664
setAnswer('Successfully ingested. Ask me anything.');
6765
}
6866
} catch (err) {
69-
console.log({ err });
70-
67+
setSelectedFile(null);
68+
setError(err);
7169
} finally {
7270
setLoading(false);
7371
}

client/services/chat-services.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ const chatServices = {
2121
ingestFile,
2222
}
2323

24-
export { chatServices };
24+
export { chatServices };

package.json

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,19 @@
1818
"@koa/router": "^12.0.0",
1919
"@mui/icons-material": "^5.11.16",
2020
"@mui/material": "^5.13.2",
21-
"@xenova/transformers": "^2.0.2",
22-
"add": "^2.0.6",
2321
"axios": "^1.4.0",
24-
"chromadb": "^1.5.1",
2522
"d3-dsv": "2",
2623
"dotenv": "^16.0.3",
2724
"hnswlib-node": "^1.4.2",
28-
"ignore": "^5.2.4",
2925
"koa": "^2.14.2",
3026
"koa-body": "^6.0.1",
3127
"koa-cors": "^0.0.16",
3228
"koa-logger": "^3.2.1",
3329
"langchain": "^0.0.84",
3430
"nodemon": "^2.0.22",
35-
"papaparse": "^5.4.1",
3631
"pdf-parse": "^1.1.1",
3732
"react": "^18.2.0",
38-
"react-dom": "^18.2.0",
39-
"redis": "^4.6.6",
40-
"uuid": "^9.0.0",
41-
"yarn": "^1.22.19"
33+
"react-dom": "^18.2.0"
4234
},
4335
"devDependencies": {
4436
"babel-preset-nano-react-app": "^0.1.0",

0 commit comments

Comments
 (0)