Skip to content

Dev #1244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 176 commits into from
Apr 21, 2025
Merged

Dev #1244

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
26581db
Read only mode for unauthenticated users (#1046)
kartikpersistent Jan 30, 2025
449552d
langchain updates (#1048)
prakriti-solankey Jan 30, 2025
2d86c5c
testing script changed for better logging errors and results of vario…
kaustubh-darekar Jan 30, 2025
578efad
Deepseek models integration (#1051)
kaustubh-darekar Jan 30, 2025
339488a
fixed top-line of drop-area (#1049)
kartikpersistent Jan 30, 2025
1dbd902
Schema viz (#1035)
prakriti-solankey Jan 30, 2025
6f3f863
updated to new ndl minor version and fixed sources modal display for …
kartikpersistent Feb 3, 2025
38eb72e
Chunk size overlap config (#1059)
prakriti-solankey Feb 7, 2025
6e60361
fix-load-existing-schema (#1061)
dhiaaeddine16 Feb 10, 2025
228ab9b
added bug report feature request and format fixes
kartikpersistent Feb 11, 2025
fbd9d3e
configured dependenabot for python
kartikpersistent Feb 11, 2025
6893a26
configuration fix
kartikpersistent Feb 11, 2025
4b831df
Fixed the logging time issue
praveshkumar1988 Feb 11, 2025
d53ba43
Backend connection config (#1060)
prakriti-solankey Feb 11, 2025
71e013e
Unable to get the status of document node resolved due to leading spa…
kaustubh-darekar Feb 11, 2025
d9a89f8
updated dependency
kartikpersistent Feb 11, 2025
2c8fe2a
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Feb 11, 2025
192a1bc
always show schema button
prakriti-solankey Feb 11, 2025
e8e576f
always show schema button
prakriti-solankey Feb 11, 2025
ed69115
uri
prakriti-solankey Feb 11, 2025
3624feb
Update README.md
kartikpersistent Feb 11, 2025
738eecc
Update README.md
kartikpersistent Feb 11, 2025
69a1003
Update README.md
kartikpersistent Feb 12, 2025
4c48124
Update README.md
kartikpersistent Feb 12, 2025
bd917ae
Fixed the create community issue for backend connection configuration
praveshkumar1988 Feb 12, 2025
8b8368b
removal of unused code
prakriti-solankey Feb 12, 2025
5591741
Support added for gpt 3o mini & gemini flash 2.0 in dev (#1069)
kaustubh-darekar Feb 12, 2025
6762367
Cancelling the API's on Unmounting phase (#1068)
kartikpersistent Feb 13, 2025
7f075d5
Merge branch 'staging' into dev
prakriti-solankey Feb 13, 2025
6a6c82c
removed unused neo4j-driver
kartikpersistent Feb 13, 2025
f198ca5
added auth0 in the frame src
kartikpersistent Feb 13, 2025
a72f3cf
message change
prakriti-solankey Feb 14, 2025
43d3bed
Update docker-compose.yml
kartikpersistent Feb 16, 2025
7bd5dd3
Bump tailwindcss from 3.4.9 to 4.0.6 in /frontend (#1091)
dependabot[bot] Feb 17, 2025
c198260
message check
prakriti-solankey Feb 17, 2025
a0cd597
V0.7.1 documentation updates (#1094)
kartikpersistent Feb 17, 2025
1cc723c
Merge branch 'staging' into dev
kartikpersistent Feb 17, 2025
db20e29
Merge branch 'staging' into dev
prakriti-solankey Feb 17, 2025
896bdee
Bump react-dropzone from 14.2.3 to 14.3.5 in /frontend (#1084)
dependabot[bot] Feb 18, 2025
8938cd1
Bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 in /fronte…
dependabot[bot] Feb 18, 2025
4ea5305
Bump eslint-plugin-react-hooks from 4.6.2 to 5.1.0 in /frontend (#1082)
dependabot[bot] Feb 18, 2025
74e8bdc
Bump typescript from 5.5.4 to 5.7.3 in /frontend (#1081)
dependabot[bot] Feb 18, 2025
5444e6b
fix-additional-instructions (#1089)
dhiaaeddine16 Feb 18, 2025
041837d
V0.7.1 minor fixes (#1097)
praveshkumar1988 Feb 19, 2025
e81655d
remove try except from llm.py
praveshkumar1988 Feb 19, 2025
78f1015
Remove example.env from main folder (#1099)
praveshkumar1988 Feb 19, 2025
fcb6bcc
moved to taulwind 3
kartikpersistent Feb 20, 2025
5c2029c
tailwind 4 migration
kartikpersistent Feb 20, 2025
36f2548
format fixes
kartikpersistent Feb 20, 2025
7e7a2c3
Source list api convert to post (#1102)
kartikpersistent Feb 20, 2025
7186ac4
Merge branch 'staging' into dev
prakriti-solankey Feb 20, 2025
7f8b8c9
height issue
prakriti-solankey Feb 20, 2025
cf92222
fix: Profile CSS Fix
kartikpersistent Feb 20, 2025
2274706
fix: display flex issue fix
kartikpersistent Feb 20, 2025
28780c5
Merge branch 'staging' into dev
prakriti-solankey Feb 21, 2025
c1b7b4d
Update dependabot.yml (#1122)
kaustubh-darekar Feb 24, 2025
5ca76aa
added automated linting and formatting through husky hooks
kartikpersistent Feb 24, 2025
0cf3f32
renamed the files
kartikpersistent Feb 24, 2025
2c9d1d6
husky setup fix
kartikpersistent Feb 24, 2025
381dc16
added permission
kartikpersistent Feb 24, 2025
97f0fd2
test commiy
kartikpersistent Feb 24, 2025
e4f1e91
type checking through husky hooks
kartikpersistent Feb 24, 2025
cc158d1
something bad code
kartikpersistent Feb 24, 2025
b88c7df
some bad code
kartikpersistent Feb 24, 2025
17ff72c
some bad code
kartikpersistent Feb 24, 2025
2f3f164
testing pre-commit code
kartikpersistent Feb 24, 2025
36c9c53
testing pre-commit code
kartikpersistent Feb 24, 2025
2bb53b1
lint setup on staged commits
kartikpersistent Feb 24, 2025
53da28c
test commt
kartikpersistent Feb 24, 2025
06d9b4f
test commit with errors
kartikpersistent Feb 24, 2025
2d084da
fix
kartikpersistent Feb 24, 2025
0b46eba
added pypandoc-binary package for OSError: No pandoc was found during…
kaustubh-darekar Feb 24, 2025
269d76b
added document plus icon
kartikpersistent Feb 25, 2025
f79feb8
Bump axios from 1.7.3 to 1.7.9 in /frontend (#1113)
dependabot[bot] Feb 25, 2025
ddb5852
Bump eslint-plugin-react-refresh from 0.4.9 to 0.4.19 in /frontend (#…
dependabot[bot] Feb 25, 2025
fcae55a
Bump postcss from 8.4.41 to 8.5.3 in /frontend (#1114)
dependabot[bot] Feb 25, 2025
69db442
Bump react-icons from 5.2.1 to 5.5.0 in /frontend (#1115)
dependabot[bot] Feb 25, 2025
b761f23
different url web page having same title issue fixed (#1110)
kaustubh-darekar Feb 25, 2025
3a222cc
Text file encoding issue (#1126)
kaustubh-darekar Feb 25, 2025
ede3095
Resolved UnicodeDecodeError issue for files having other than utf-8 e…
kaustubh-darekar Feb 26, 2025
370ab9e
Sanitizing additional instruction (#1130)
kaustubh-darekar Feb 26, 2025
ebbabd3
resolved UnboundLocalError: local variable 'graphDb_data_Access' refe…
kaustubh-darekar Feb 26, 2025
aca4f81
connection not there message for data resources (#1131)
prakriti-solankey Feb 26, 2025
455269b
dockerfile updates and utils functions change
prakriti-solankey Feb 26, 2025
e81aa00
fix: readonly issue fix
kartikpersistent Feb 27, 2025
a1ed635
Resolved uploaded file extraction failing on deployed version (#1136)
kaustubh-darekar Feb 27, 2025
cf11494
UI fixes v0.7.2 (#1138)
kartikpersistent Mar 3, 2025
979434d
Update BreakDownPopOver.tsx
kartikpersistent Mar 3, 2025
41b0370
chunk_count_val
prakriti-solankey Mar 3, 2025
bfe127f
type error
prakriti-solankey Mar 3, 2025
93ff881
spell fixes and protected route fixes
kartikpersistent Mar 3, 2025
a1a998e
top entities not found - bug resolved (#1150)
kaustubh-darekar Mar 4, 2025
506dfb0
limiting content fetching to current wikipedia page (#1151)
kaustubh-darekar Mar 4, 2025
3c8d669
added the link for login redirectig
kartikpersistent Mar 4, 2025
a8fb41a
removed loading statw
kartikpersistent Mar 5, 2025
de69dbd
added the padding and changed the message
kartikpersistent Mar 5, 2025
1ee0112
Bump re-resizable from 6.9.17 to 6.11.2 in /frontend (#1149)
dependabot[bot] Mar 5, 2025
e26a2e2
Bump eslint-plugin-react from 7.35.0 to 7.37.4 in /frontend (#1148)
dependabot[bot] Mar 5, 2025
2fe68f7
Bump @types/node from 20.14.14 to 22.13.9 in /frontend (#1152)
dependabot[bot] Mar 5, 2025
6f1e96d
Bump eslint-config-prettier from 8.10.0 to 10.0.2 in /frontend (#1146)
dependabot[bot] Mar 5, 2025
9e427c8
Bump react-dropzone from 14.3.5 to 14.3.8 in /frontend (#1145)
dependabot[bot] Mar 5, 2025
0090ae1
Update dependabot.yml
kartikpersistent Mar 5, 2025
738bc5b
Update the query to check DB is gds version (#1153)
praveshkumar1988 Mar 6, 2025
36c3fa4
Entity details shown for entity mode (#1154)
kaustubh-darekar Mar 6, 2025
dc0b83c
Merge branch 'staging' into dev
kartikpersistent Mar 6, 2025
e1fa2d5
bracket missing
prakriti-solankey Mar 6, 2025
ab75932
fix: auth 0 fix
kartikpersistent Mar 6, 2025
5f39980
Merge branch 'staging' into dev
kartikpersistent Mar 6, 2025
1014119
fixes (#1170)
kartikpersistent Mar 10, 2025
0f9c9a2
Bump @neo4j-nvl/react from 0.3.6 to 0.3.7 in /frontend (#1163)
dependabot[bot] Mar 17, 2025
d74b5ea
Bump @tailwindcss/postcss from 4.0.7 to 4.0.12 in /frontend (#1162)
dependabot[bot] Mar 17, 2025
11003a9
Bump prettier from 2.8.8 to 3.5.3 in /frontend (#1161)
dependabot[bot] Mar 17, 2025
cb907be
Bump @types/node from 22.13.9 to 22.13.10 in /frontend (#1160)
dependabot[bot] Mar 17, 2025
c67abd5
Bump axios from 1.7.9 to 1.8.2 in /frontend (#1159)
dependabot[bot] Mar 17, 2025
927c372
gitignore changes
kartikpersistent Mar 17, 2025
8604b5b
border missing for graph
prakriti-solankey Mar 17, 2025
7bde2ab
openai 4.5 and claude 3.7 added (#1181)
kaustubh-darekar Mar 18, 2025
59aebba
Handled deadlock errors in executing cypher query (#1187)
kaustubh-darekar Mar 19, 2025
7eb344e
Updating dependencies (#1189)
kaustubh-darekar Mar 19, 2025
93765a3
updating node & rel count in between extraction process (#1191)
kaustubh-darekar Mar 19, 2025
4dd1299
fix: Database name not being passed
kartikpersistent Mar 20, 2025
14e81c7
added generic type for queue
kartikpersistent Mar 21, 2025
7273d88
Fix : default value of function param
praveshkumar1988 Mar 24, 2025
4db55ab
log the info only when last chunk uploaded and merge the file
praveshkumar1988 Mar 24, 2025
81e7255
Product tour v1 (#1186)
kartikpersistent Mar 25, 2025
ccc94e1
tour fix for auth disabled scenario
kartikpersistent Apr 3, 2025
c6c9dc1
removed unused code
kartikpersistent Apr 3, 2025
2a337e0
conditions updates
kartikpersistent Apr 3, 2025
bc18c7f
Merge branch 'staging' into dev
kartikpersistent Apr 4, 2025
624c15d
Selection dropdown (#1217)
prakriti-solankey Apr 4, 2025
b609bf4
lint fixes
kartikpersistent Apr 4, 2025
8855fde
changes
prakriti-solankey Apr 4, 2025
8b4e1ba
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Apr 4, 2025
d59444a
lint issues
prakriti-solankey Apr 4, 2025
faff0c3
Merge branch 'staging' into dev
kartikpersistent Apr 4, 2025
fb1a18e
Bump @mui/styled-engine from 5.16.6 to 7.0.1 in /frontend (#1209)
dependabot[bot] Apr 4, 2025
8a56e42
Bump eslint-config-prettier from 10.0.2 to 10.1.1 in /frontend (#1208)
dependabot[bot] Apr 4, 2025
d4ff5f6
Bump uuid from 9.0.1 to 11.1.0 in /frontend (#1207)
dependabot[bot] Apr 4, 2025
b5ed17b
Bump axios from 1.8.3 to 1.8.4 in /frontend (#1206)
dependabot[bot] Apr 4, 2025
3927cc0
Bump lint-staged from 15.4.3 to 15.5.0 in /frontend (#1205)
dependabot[bot] Apr 4, 2025
44743c0
Gemini 2.5 model addition (#1221)
kaustubh-darekar Apr 7, 2025
7c1e11c
Updating source node for failed upload file (#1222)
kaustubh-darekar Apr 8, 2025
cc9164a
Llama4 model addition (#1223)
kaustubh-darekar Apr 8, 2025
bd34cfe
Update README.md
kartikpersistent Apr 8, 2025
f99e642
Update README.md
kartikpersistent Apr 8, 2025
c678890
Update README.md
kartikpersistent Apr 8, 2025
3949bb7
Update requirements.txt
karanchellani Apr 8, 2025
4355776
New fixes (#1224)
prakriti-solankey Apr 8, 2025
304675a
Update README.md
kartikpersistent Apr 8, 2025
cefb5b6
New fixes (#1228)
kartikpersistent Apr 9, 2025
e4dc92b
lint fixes
kartikpersistent Apr 9, 2025
6d50d54
type fix
kartikpersistent Apr 9, 2025
96aa510
Updated backend dependencies (#1225)
kaustubh-darekar Apr 9, 2025
45a76bf
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Apr 9, 2025
2b28d14
Merge branch 'staging' into dev
kartikpersistent Apr 9, 2025
de405c3
Graph schema option (#1230)
prakriti-solankey Apr 10, 2025
da0de9e
Bump json-repair from 0.30.3 to 0.40.0 in /backend (#1203)
dependabot[bot] Apr 11, 2025
5b51058
models change
prakriti-solankey Apr 11, 2025
3aebd90
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Apr 11, 2025
61cb5ba
Update Backend API doc
praveshkumar1988 Apr 11, 2025
c877e15
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
praveshkumar1988 Apr 11, 2025
209ae28
Update README.md
kartikpersistent Apr 12, 2025
db7f229
Added log statement to check which database it creates source node (#…
kaustubh-darekar Apr 15, 2025
da91c06
New models addition (#1233)
kaustubh-darekar Apr 16, 2025
fca8ba6
version conflict of json repair package with langchain_neo4j and neo4…
kaustubh-darekar Apr 16, 2025
04bd47b
Schema render (#1235)
prakriti-solankey Apr 17, 2025
1a48b16
Integration test formatting updates (#1237)
kaustubh-darekar Apr 17, 2025
304ec80
added plugins for markdown
kartikpersistent Apr 17, 2025
2ac5ad3
bug: removed gcs as default source
kartikpersistent Apr 18, 2025
292737e
fix: build error
kartikpersistent Apr 18, 2025
bf78c0c
Merge branch 'staging' into dev
kartikpersistent Apr 18, 2025
c63a201
Error fixed : local variable 'file_name' referenced before assignment
praveshkumar1988 Apr 21, 2025
7de2e62
Fix: Rerendering fix of Filetable
kartikpersistent Apr 21, 2025
963f941
fix: Rerendering fix by function Memoization
kartikpersistent Apr 21, 2025
e63d797
Update README.md
kartikpersistent Apr 21, 2025
3a16c71
Update README.md
kartikpersistent Apr 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 5 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,6 @@ VITE_BACKEND_API_URL=${VITE_BACKEND_API_URL-backendurl}
7. Enjoy Graph Building.
---

## Additional Configuration

### **LLM Models**
Configure LLM models using the `VITE_LLM_MODELS_PROD` variable. Example:
```bash
VITE_LLM_MODELS_PROD="openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash"
```

### **Input Sources**
The default input sources are: `local`, `YouTube`, `Wikipedia`, `AWS S3`, and `web`.

To enable GCS integration, include `gcs` and your Google client ID:
```bash
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,gcs,web"
VITE_GOOGLE_CLIENT_ID="your-google-client-id"
```

## Usage
1. Connect to Neo4j Aura Instance which can be both AURA DS or AURA DB by passing URI and password through Backend env, fill using login dialog or drag and drop the Neo4j credentials file.
Expand Down Expand Up @@ -237,16 +221,16 @@ VITE_GOOGLE_CLIENT_ID="your-google-client-id"
| RAGAS_EMBEDDING_MODEL | Optional | openai | embedding model used by ragas evaluation framework |
| |
| **FRONTEND ENV**
| VITE_BACKEND_API_URL | Optional | http://localhost:8000 | URL for backend API |
| VITE_BLOOM_URL | Optional | https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true | URL for Bloom visualization |
| VITE_BLOOM_URL | Mandatory | https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true | URL for Bloom visualization |
| VITE_REACT_APP_SOURCES | Mandatory | local,youtube,wiki,s3 | List of input sources that will be available |
| VITE_CHAT_MODES | Mandatory | vector,graph+vector,graph,hybrid | Chat modes available for Q&A
| VITE_ENV | Mandatory | DEV or PROD | Environment variable for the app |
| VITE_ENV | Mandatory | DEV or PROD | Environment variable for the app|
| VITE_LLM_MODELS | Mandatory | 'diffbot,openai_gpt_3.5,openai_gpt_4o,openai_gpt_4o_mini,gemini_1.5_pro,gemini_1.5_flash,azure_ai_gpt_35,azure_ai_gpt_4o,ollama_llama3,groq_llama3_70b,anthropic_claude_3_5_sonnet' | Supported Models For the application
| VITE_BACKEND_API_URL | Optional | http://localhost:8000 | URL for backend API |
| VITE_TIME_PER_PAGE | Optional | 50 | Time per page for processing |
| VITE_CHUNK_SIZE | Optional | 5242880 | Size of each chunk of file for upload |
| VITE_GOOGLE_CLIENT_ID | Optional | | Client ID for Google authentication |
| VITE_LLM_MODELS_PROD | Optional | openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash | To Distinguish models based on the Enviornment PROD or DEV
| VITE_LLM_MODELS | Optional | 'diffbot,openai_gpt_3.5,openai_gpt_4o,openai_gpt_4o_mini,gemini_1.5_pro,gemini_1.5_flash,azure_ai_gpt_35,azure_ai_gpt_4o,ollama_llama3,groq_llama3_70b,anthropic_claude_3_5_sonnet' | Supported Models For the application
| VITE_LLM_MODELS_PROD | Optional | openai_gpt_4o,openai_gpt_4o_mini,diffbot,gemini_1.5_flash | To Distinguish models based on the Enviornment PROD or DEV |
| VITE_AUTH0_CLIENT_ID | Mandatory if you are enabling Authentication otherwise it is optional | |Okta Oauth Client ID for authentication
| VITE_AUTH0_DOMAIN | Mandatory if you are enabling Authentication otherwise it is optional | | Okta Oauth Cliend Domain
| VITE_SKIP_AUTH | Optional | true | Flag to skip the authentication
Expand Down
2 changes: 1 addition & 1 deletion backend/src/document_sources/wikipedia.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ def get_documents_from_Wikipedia(wiki_query:str, language:str):
except Exception as e:
message="Failed To Process Wikipedia Query"
error_message = str(e)
logging.exception(f'Failed To Process Wikipedia Query: {file_name}, Exception Stack trace: {error_message}')
logging.exception(f'Failed To Process Wikipedia Query, Exception Stack trace: {error_message}')
raise LLMGraphBuilderException(error_message+' '+message)

41 changes: 29 additions & 12 deletions backend/test_integrationqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
from dotenv import load_dotenv
from src.main import *
from src.QA_integration import QA_RAG
from src.ragas_eval import get_ragas_metrics
from datasets import Dataset

# Load environment variables
load_dotenv()
URI = os.getenv('NEO4J_URI')
Expand Down Expand Up @@ -49,7 +48,7 @@ def test_graph_from_file_local(model_name):
create_source_node_local(graph, model_name, file_name)
result = asyncio.run(
extract_graph_from_file_local_file(
URI, USERNAME, PASSWORD, DATABASE, model_name, merged_file_path, file_name, '', '', None, ''
URI, USERNAME, PASSWORD, DATABASE, model_name, merged_file_path, file_name, '', '',100,20,1, None,''
)
)
logging.info(f"Local file test result: {result}")
Expand All @@ -67,7 +66,7 @@ def test_graph_from_wikipedia(model_name):
create_source_node_graph_url_wikipedia(graph, model_name, wiki_query, "Wikipedia")
result = asyncio.run(
extract_graph_from_file_Wikipedia(
URI, USERNAME, PASSWORD, DATABASE, model_name, file_name, 'en', file_name, '', '', None, ''
URI, USERNAME, PASSWORD, DATABASE, model_name, file_name, 'en', file_name, '', '', 100,20,1,None,''
)
)
logging.info(f"Wikipedia test result: {result}")
Expand All @@ -85,9 +84,9 @@ def test_graph_from_youtube_video(model_name):
create_source_node_graph_url_youtube(graph, model_name, source_url, "youtube")
result = asyncio.run(
extract_graph_from_file_youtube(
URI, USERNAME, PASSWORD, DATABASE, model_name, source_url, file_name, '', '', None, ''
URI, USERNAME, PASSWORD, DATABASE, model_name, source_url, file_name, '', '',100,20,1, None,''
)
)
)
logging.info(f"YouTube video test result: {result}")
if isinstance(result, dict) and result.get("status") == "Failed":
return {"status": "Failed", "error": result.get("error", "Unknown error")}
Expand All @@ -104,7 +103,7 @@ def test_graph_website(model_name):
create_source_node_graph_web_url(graph, model_name, source_url, "web-url")
result = asyncio.run(
extract_graph_from_web_page(
URI, USERNAME, PASSWORD, DATABASE, model_name, source_url, "Google Cloud Skills Boost", '', '', None, ''
URI, USERNAME, PASSWORD, DATABASE, model_name, source_url, "Google Cloud Skills Boost-www", '', '',100,20,1, None,''
)
)
logging.info(f"Web URL test result: {result}")
Expand All @@ -122,7 +121,8 @@ def test_chatbot_qna(model_name, mode='vector'):
result = QA_RAG(graph, model_name, 'Tell me about Amazon', '[]', 1, mode)
# assert len(result['message']) > 20
logging.info(f"Chatbot QnA test passed for mode: {mode}")
return result
final_result = {'model_name':model_name,'mode':mode,'result':result}
return final_result
except Exception as e:
logging.error(f"Error in chatbot QnA: {e}")
return {"status": "Failed", "error": str(e)}
Expand Down Expand Up @@ -170,15 +170,34 @@ def get_duplicate_nodes():
return "Data successfully loaded"
else:
return "Unable to load data"


def flatten_extract_dataframe(df: pd.DataFrame):
rows = []
for _, row in df.iterrows():
try:
col1, col2, execution_date = row[0], row[1], row[2] if len(row) > 2 else None
data_dict = ast.literal_eval(col1) if isinstance(col1, str) and col1.startswith("{") else {}
meta_dict = ast.literal_eval(col2) if isinstance(col2, str) and col2.startswith("{") else {}
combined_dict = {**data_dict, **meta_dict}
for key in combined_dict.keys():
if isinstance(combined_dict[key], dict) and key.startswith("processed_chunk_detail"):
combined_dict[key] = str(combined_dict[key])
combined_dict["execution_date"] = execution_date
rows.append(combined_dict)
except (SyntaxError, ValueError, TypeError) as e:
print(f"Error parsing row: {row} - {e}")
continue
flat_df = pd.DataFrame(rows)
return flat_df

def run_tests():
"""Runs all integration tests and logs results."""
extract_list = []
extract_error_list = []
chatbot_list = []
chatbot_error_list = []
other_api_list = []
models = ['openai_gpt_4','openai_gpt_4o','openai_gpt_4o_mini','gemini_1.5_pro','gemini_1.5_flash','gemini_2.0_flash','bedrock_nova_micro_v1','bedrock_nova_lite_v1','bedrock_nova_pro_v1','fireworks_qwen72b_instruct']
models = ['openai_gpt_4o','openai_gpt_4o_mini','openai_gpt_4.1','openai_gpt_4.1_mini','gemini_2.0_flash','fireworks_llama4_maverick','bedrock_nova_pro_v1']
chatbot_modes = [
"vector",
"graph+vector",
Expand Down Expand Up @@ -218,9 +237,7 @@ def run_tests():

try:
schema_result = test_populate_graph_schema_from_text(model_name)
print("KAUSTUBH : ",schema_result)
other_api_list.append({f"{model_name}":schema_result})
print("other_api_list : ",other_api_list)
except Exception as e:
logging.error(f"Error in test_populate_graph_schema_from_text for {model_name}: {e}")
other_api_list.append({f"{model_name}":str(e)})
Expand Down
4 changes: 3 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.5.0",
"react-markdown": "^9.0.1",
"react-markdown": "^10.1.0",
"react-router": "^6.23.1",
"react-router-dom": "^6.23.1",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.1",
"uuid": "^11.1.0"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -469,4 +469,5 @@
.animate-highlight {
animation: highlightAnimation 1.5s ease-in-out;
border: 2px solid rgb(var(--theme-palette-primary-bg-strong));
}
}

16 changes: 13 additions & 3 deletions frontend/src/components/ChatBot/Chatbot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ import { downloadClickHandler, getDateTime } from '../../utils/Utils';
import ChatModesSwitch from './ChatModesSwitch';
import CommonActions from './CommonChatActions';
import Loader from '../../utils/Loader';
import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw';
const InfoModal = lazy(() => import('./ChatInfoModal'));
if (typeof window !== 'undefined') {
if (!sessionStorage.getItem('session_id')) {
Expand Down Expand Up @@ -467,9 +469,17 @@ const Chatbot: FC<ChatbotProps> = (props) => {
chat.isLoading && index === listMessages.length - 1 && chat.user === 'chatbot' ? 'loader' : ''
}`}
>
<ReactMarkdown className={!isFullScreen ? 'max-w-[250px]' : ''}>
{chat.modes[chat.currentMode]?.message || ''}
</ReactMarkdown>
<div
className={
!isFullScreen
? 'max-w-[250px] prose prose-sm sm:prose lg:prose-lg xl:prose-xl'
: 'prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-none'
}
>
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw] as any}>
{chat.modes[chat.currentMode]?.message || ''}
</ReactMarkdown>
</div>
</div>
<div>
<div>
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/components/ChatBot/ChunkInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { chatModeLables } from '../../utils/Constants';
import GraphViewModal from '../Graph/GraphViewModal';
import { handleGraphNodeClick } from './chatInfo';
import { IconButtonWithToolTip } from '../UI/IconButtonToolTip';

import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw';
const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
const themeUtils = useContext(ThemeWrapperContext);
const [neoNodes, setNeoNodes] = useState<any[]>([]);
Expand Down Expand Up @@ -257,8 +258,10 @@ const ChunkInfo: FC<ChunkProps> = ({ loading, chunks, mode }) => {
</div>
</>
)}
<div className='mt-2'>
<ReactMarkdown>{chunk?.text}</ReactMarkdown>
<div className='mt-2 prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-none'>
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw] as any}>
{chunk?.text}
</ReactMarkdown>
</div>
</li>
))}
Expand Down
9 changes: 7 additions & 2 deletions frontend/src/components/ChatBot/CommunitiesInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { CommunitiesProps } from '../../types';
import { chatModeLables } from '../../utils/Constants';
import GraphViewModal from '../Graph/GraphViewModal';
import { handleGraphNodeClick } from './chatInfo';

import remarkGfm from 'remark-gfm';
import rehypeRaw from 'rehype-raw';
const CommunitiesInfo: FC<CommunitiesProps> = ({ loading, communities, mode }) => {
const [neoNodes, setNeoNodes] = useState<any[]>([]);
const [neoRels, setNeoRels] = useState<any[]>([]);
Expand Down Expand Up @@ -51,7 +52,11 @@ const CommunitiesInfo: FC<CommunitiesProps> = ({ loading, communities, mode }) =
<Typography variant='subheading-medium'>{community.score}</Typography>
</Flex>
)}
<ReactMarkdown>{community.summary}</ReactMarkdown>
<div className='prose prose-sm sm:prose lg:prose-lg xl:prose-xl max-w-none'>
<ReactMarkdown remarkPlugins={[remarkGfm]} rehypePlugins={[rehypeRaw] as any}>
{community.summary}
</ReactMarkdown>
</div>
</div>
</li>
))}
Expand Down
48 changes: 26 additions & 22 deletions frontend/src/components/Content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import { useHasSelections } from '../hooks/useHasSelections';
import { ChevronUpIconOutline, ChevronDownIconOutline } from '@neo4j-ndl/react/icons';
import { ThemeWrapperContext } from '../context/ThemeWrapper';
import { useAuth0 } from '@auth0/auth0-react';
import React from 'react';

const ConfirmationDialog = lazy(() => import('./Popups/LargeFilePopUp/ConfirmationDialog'));

Expand Down Expand Up @@ -168,10 +169,10 @@ const Content: React.FC<ContentProps> = ({
? postProcessingTasks.filter((task) => task !== 'graph_schema_consolidation')
: postProcessingTasks
: hasSelections
? postProcessingTasks.filter(
(task) => task !== 'graph_schema_consolidation' && task !== 'enable_communities'
)
: postProcessingTasks.filter((task) => task !== 'enable_communities');
? postProcessingTasks.filter(
(task) => task !== 'graph_schema_consolidation' && task !== 'enable_communities'
)
: postProcessingTasks.filter((task) => task !== 'enable_communities');
if (payload.length) {
const response = await postProcessing(payload);
if (response.data.status === 'Success') {
Expand Down Expand Up @@ -236,7 +237,7 @@ const Content: React.FC<ContentProps> = ({
...curfile,
model:
curfile.status === 'New' || curfile.status === 'Ready to Reprocess'
? selectedOption?.value ?? ''
? (selectedOption?.value ?? '')
: curfile.model,
};
});
Expand Down Expand Up @@ -536,7 +537,7 @@ const Content: React.FC<ContentProps> = ({
}
};

const processWaitingFilesOnRefresh = () => {
const processWaitingFilesOnRefresh = useCallback(() => {
let data = [];
const processingFilesCount = filesData.filter((f) => f.status === 'Processing').length;

Expand All @@ -556,7 +557,7 @@ const Content: React.FC<ContentProps> = ({
.filter((f) => f.status === 'New' || f.status == 'Ready to Reprocess');
addFilesToQueue(selectedNewFiles as CustomFile[]);
}
};
}, [filesData, queue]);

const handleOpenGraphClick = () => {
const bloomUrl = process.env.VITE_BLOOM_URL;
Expand Down Expand Up @@ -966,26 +967,29 @@ const Content: React.FC<ContentProps> = ({
<FileTable
connectionStatus={connectionStatus}
setConnectionStatus={setConnectionStatus}
onInspect={(name) => {
onInspect={useCallback((name) => {
setInspectedName(name);
setOpenGraphView(true);
setViewPoint('tableView');
}}
onRetry={(id) => {
}, [])}
onRetry={useCallback((id) => {
setRetryFile(id);
toggleRetryPopup();
}}
onChunkView={async (name) => {
setDocumentName(name);
if (name != documentName) {
toggleChunkPopup();
if (totalPageCount) {
setTotalPageCount(null);
}, [])}
onChunkView={useCallback(
async (name) => {
setDocumentName(name);
if (name != documentName) {
toggleChunkPopup();
if (totalPageCount) {
setTotalPageCount(null);
}
setCurrentPage(1);
await getChunks(name, 1);
}
setCurrentPage(1);
await getChunks(name, 1);
}
}}
},
[documentName, totalPageCount]
)}
ref={childRef}
handleGenerateGraph={processWaitingFilesOnRefresh}
></FileTable>
Expand Down Expand Up @@ -1089,4 +1093,4 @@ const Content: React.FC<ContentProps> = ({
);
};

export default Content;
export default React.memo(Content);
8 changes: 4 additions & 4 deletions frontend/src/components/FileTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import { ThemeWrapperContext } from '../context/ThemeWrapper';
import BreakDownPopOver from './BreakDownPopOver';
import { InformationCircleIconOutline } from '@neo4j-ndl/react/icons';
import { useAuth0 } from '@auth0/auth0-react';
import React from 'react';

let onlyfortheFirstRender = true;

Expand All @@ -89,7 +90,6 @@ const FileTable: ForwardRefRenderFunction<ChildRef, FileTableProps> = (props, re
const islargeDesktop = useMediaQuery(`(min-width:1440px )`);
const tableRef = useRef(null);
const { isAuthenticated } = useAuth0();

const { updateStatusForLargeFiles } = useServerSideEvent(
(inMinutes, time, fileName) => {
showNormalToast(`${fileName} will take approx ${time} ${inMinutes ? 'Min' : 'Sec'}`);
Expand Down Expand Up @@ -729,8 +729,8 @@ const FileTable: ForwardRefRenderFunction<ChildRef, FileTableProps> = (props, re
name: item?.fileName,
size: item?.fileSize ?? 0,
type: item?.fileType?.includes('.')
? item?.fileType?.substring(1)?.toUpperCase() ?? 'None'
: item?.fileType?.toUpperCase() ?? 'None',
? (item?.fileType?.substring(1)?.toUpperCase() ?? 'None')
: (item?.fileType?.toUpperCase() ?? 'None'),
nodesCount: item?.nodeCount ?? 0,
processingTotalTime: item?.processingTime ?? 'None',
relationshipsCount: item?.relationshipCount ?? 0,
Expand Down Expand Up @@ -1061,4 +1061,4 @@ const FileTable: ForwardRefRenderFunction<ChildRef, FileTableProps> = (props, re
);
};

export default forwardRef(FileTable);
export default React.memo(forwardRef(FileTable));
Loading