Skip to content

Dev #1284

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 218 commits into from
May 15, 2025
Merged

Dev #1284

Show file tree
Hide file tree
Changes from 217 commits
Commits
Show all changes
218 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
59829f0
fix: accessibility-fixes
kartikpersistent Apr 23, 2025
c8d1052
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Apr 23, 2025
f5a9af6
Vector index exist (#1249)
kaustubh-darekar Apr 25, 2025
8f08e41
Validation for tuple schema (#1248)
kartikpersistent Apr 25, 2025
ca9a4cd
fix: hooks order mismatch
kartikpersistent Apr 28, 2025
a2ba507
drawer useCallback fix
kartikpersistent Apr 28, 2025
f8d73f9
labels change
prakriti-solankey Apr 28, 2025
b512e89
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Apr 28, 2025
7ed7aa5
fix: unnecessary use of useEffect
kartikpersistent Apr 28, 2025
4e06911
moving out the common funtion
kartikpersistent Apr 28, 2025
2c1a626
removed useEffect
prakriti-solankey Apr 28, 2025
cac5fad
fix: Schema Statemanagement issue
kartikpersistent Apr 30, 2025
ebcdf9f
edge case
kartikpersistent Apr 30, 2025
7e84c3c
Bump eslint-plugin-react-refresh from 0.4.19 to 0.4.20 in /frontend (…
dependabot[bot] May 5, 2025
ce4b069
Bump tailwindcss from 4.0.12 to 4.1.5 in /frontend (#1265)
dependabot[bot] May 5, 2025
fa5e518
Bump @mui/styled-engine from 7.0.1 to 7.0.2 in /frontend (#1264)
dependabot[bot] May 5, 2025
24f6d29
Bump @types/uuid from 9.0.8 to 10.0.0 in /frontend (#1263)
dependabot[bot] May 5, 2025
32a5578
Bump @emotion/styled from 11.13.0 to 11.14.0 in /frontend (#1262)
dependabot[bot] May 5, 2025
c6682f3
removed the help text
kartikpersistent May 5, 2025
27d65ba
title: fix for small layouts
kartikpersistent May 5, 2025
e9f399d
fix: gcs,s3 source check
kartikpersistent May 5, 2025
b5a91a0
minimize the docker file size using torch CPU version (#1246)
praveshkumar1988 May 6, 2025
f1d30de
Removing PART_OF relationship from exluded list because excluded node…
praveshkumar1988 May 8, 2025
ab93e69
Removed HAS_ENTITY from excude relatioship list
praveshkumar1988 May 8, 2025
38e952c
Dropdown update (#1272)
prakriti-solankey May 8, 2025
8ff51ec
Update the query to get relationship patterns (#1276)
praveshkumar1988 May 8, 2025
85558ba
llama4 , qwen models added (#1277)
kaustubh-darekar May 8, 2025
3cc349b
loaded .env file to override the env variables set at shell level. (#…
kaustubh-darekar May 8, 2025
4088d66
buf fixed
prakriti-solankey May 8, 2025
fc62e7d
Merge branch 'staging' of https://github.com/neo4j-labs/llm-graph-bui…
kartikpersistent May 9, 2025
0ce7910
fix: missing import
kartikpersistent May 12, 2025
61fd5bb
passed session parameters to avoid race condition (#1283)
kaustubh-darekar May 12, 2025
19df553
v0.8.1 fix release (#1280)
kartikpersistent May 12, 2025
0a2bcb6
cursor copy
prakriti-solankey May 12, 2025
137ac70
format issue on upload
prakriti-solankey May 13, 2025
294db73
Merge branch 'main' of https://github.com/neo4j-labs/llm-graph-builde…
prakriti-solankey May 13, 2025
ba4c6f7
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey May 13, 2025
4b347dd
added database
kartikpersistent May 13, 2025
3b24486
Merge branch 'dev' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent May 13, 2025
cfa8195
Merge branch 'staging' into dev
kartikpersistent May 13, 2025
4bec84a
code changes done to get model name from llm to condition ignore tool…
kaustubh-darekar May 14, 2025
b994dbe
added allowednodes and relationship in logs while error logging
praveshkumar1988 May 14, 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
5 changes: 3 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ RUN apt-get update && \
# Set LD_LIBRARY_PATH
ENV LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
# Copy requirements file and install Python dependencies
COPY requirements.txt /code/
COPY requirements.txt constraints.txt /code/
# --no-cache-dir --upgrade
RUN pip install -r requirements.txt
RUN pip install --upgrade pip
RUN pip install -r requirements.txt -c constraints.txt
# Copy application code
COPY . /code
# Set command
Expand Down
4 changes: 4 additions & 0 deletions backend/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-f https://download.pytorch.org/whl/torch_stable.html
torch==2.3.1+cpu
torchvision==0.18.1+cpu
torchaudio==2.3.1+cpu
13 changes: 2 additions & 11 deletions backend/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,10 @@
from src.ragas_eval import *
from starlette.types import ASGIApp, Receive, Scope, Send
from langchain_neo4j import Neo4jGraph
from src.entities.source_node import sourceNode
from starlette.middleware.sessions import SessionMiddleware
from starlette.responses import HTMLResponse, RedirectResponse,JSONResponse
from starlette.requests import Request
import secrets
from dotenv import load_dotenv
load_dotenv(override=True)

logger = CustomLogger()
CHUNK_DIR = os.path.join(os.path.dirname(__file__), "chunks")
Expand Down Expand Up @@ -342,14 +341,6 @@ async def get_source_list(
"""
try:
start = time.time()
# if password is not None and password != "null":
# decoded_password = decode_password(password)
# else:
# decoded_password = None
# userName = None
# database = None
# if " " in uri:
# uri = uri.replace(" ","+")
result = await asyncio.to_thread(get_source_list_from_graph,uri,userName,password,database)
end = time.time()
elapsed_time = end - start
Expand Down
32 changes: 16 additions & 16 deletions backend/src/graphDB_dataAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ def update_exception_db(self, file_name, exp_msg, retry_condition=None):
if retry_condition is not None:
retry_condition = None
self.graph.query("""MERGE(d:Document {fileName :$fName}) SET d.status = $status, d.errorMessage = $error_msg, d.retry_condition = $retry_condition""",
{"fName":file_name, "status":job_status, "error_msg":exp_msg, "retry_condition":retry_condition})
{"fName":file_name, "status":job_status, "error_msg":exp_msg, "retry_condition":retry_condition},session_params={"database":self.graph._database})
else :
self.graph.query("""MERGE(d:Document {fileName :$fName}) SET d.status = $status, d.errorMessage = $error_msg""",
{"fName":file_name, "status":job_status, "error_msg":exp_msg})
{"fName":file_name, "status":job_status, "error_msg":exp_msg},session_params={"database":self.graph._database})
except Exception as e:
error_message = str(e)
logging.error(f"Error in updating document node status as failed: {error_message}")
Expand Down Expand Up @@ -66,7 +66,7 @@ def create_source_node(self, obj_source_node:sourceNode):
"entityEntityRelCount":obj_source_node.entityEntityRelCount,
"communityNodeCount":obj_source_node.communityNodeCount,
"communityRelCount":obj_source_node.communityRelCount
})
},session_params={"database":self.graph._database})
except Exception as e:
error_message = str(e)
logging.info(f"error_message = {error_message}")
Expand Down Expand Up @@ -118,7 +118,7 @@ def update_source_node(self, obj_source_node:sourceNode):
logging.info(f'Base Param value 1 : {param}')
query = "MERGE(d:Document {fileName :$props.fileName}) SET d += $props"
logging.info("Update source node properties")
self.graph.query(query,param)
self.graph.query(query,param,session_params={"database":self.graph._database})
except Exception as e:
error_message = str(e)
self.update_exception_db(self,self.file_name,error_message)
Expand All @@ -139,15 +139,15 @@ def get_source_list(self):
"""
logging.info("Get existing files list from graph")
query = "MATCH(d:Document) WHERE d.fileName IS NOT NULL RETURN d ORDER BY d.updatedAt DESC"
result = self.graph.query(query)
result = self.graph.query(query,session_params={"database":self.graph._database})
list_of_json_objects = [entry['d'] for entry in result]
return list_of_json_objects

def update_KNN_graph(self):
"""
Update the graph node with SIMILAR relationship where embedding scrore match
"""
index = self.graph.query("""show indexes yield * where type = 'VECTOR' and name = 'vector'""")
index = self.graph.query("""show indexes yield * where type = 'VECTOR' and name = 'vector'""",session_params={"database":self.graph._database})
# logging.info(f'show index vector: {index}')
knn_min_score = os.environ.get('KNN_MIN_SCORE')
if len(index) > 0:
Expand All @@ -158,14 +158,14 @@ def update_KNN_graph(self):
WHERE node <> c and score >= $score MERGE (c)-[rel:SIMILAR]-(node) SET rel.score = score
""",
{"score":float(knn_min_score)}
)
,session_params={"database":self.graph._database})
else:
logging.info("Vector index does not exist, So KNN graph not update")

def check_account_access(self, database):
try:
query_dbms_componenet = "call dbms.components() yield edition"
result_dbms_componenet = self.graph.query(query_dbms_componenet)
result_dbms_componenet = self.graph.query(query_dbms_componenet,session_params={"database":self.graph._database})

if result_dbms_componenet[0]["edition"] == "enterprise":
query = """
Expand All @@ -177,7 +177,7 @@ def check_account_access(self, database):

logging.info(f"Checking access for database: {database}")

result = self.graph.query(query, params={"database": database})
result = self.graph.query(query, params={"database": database},session_params={"database":self.graph._database})
read_access_count = result[0]["readAccessCount"] if result else 0

logging.info(f"Read access count: {read_access_count}")
Expand All @@ -202,7 +202,7 @@ def check_gds_version(self):
gds_procedure_count = """
SHOW FUNCTIONS YIELD name WHERE name STARTS WITH 'gds.version' RETURN COUNT(*) AS totalGdsProcedures
"""
result = self.graph.query(gds_procedure_count)
result = self.graph.query(gds_procedure_count,session_params={"database":self.graph._database})
total_gds_procedures = result[0]['totalGdsProcedures'] if result else 0

if total_gds_procedures > 0:
Expand Down Expand Up @@ -231,11 +231,11 @@ def connection_check_and_get_vector_dimensions(self,database):
db_vector_dimension = self.graph.query("""SHOW INDEXES YIELD *
WHERE type = 'VECTOR' AND name = 'vector'
RETURN options.indexConfig['vector.dimensions'] AS vector_dimensions
""")
""",session_params={"database":self.graph._database})

result_chunks = self.graph.query("""match (c:Chunk) return size(c.embedding) as embeddingSize, count(*) as chunks,
count(c.embedding) as hasEmbedding
""")
""",session_params={"database":self.graph._database})

embedding_model = os.getenv('EMBEDDING_MODEL')
embeddings, application_dimension = load_embedding_model(embedding_model)
Expand All @@ -260,7 +260,7 @@ def execute_query(self, query, param=None,max_retries=3, delay=2):
retries = 0
while retries < max_retries:
try:
return self.graph.query(query, param)
return self.graph.query(query, param,session_params={"database":self.graph._database})
except TransientError as e:
if "DeadlockDetected" in str(e):
retries += 1
Expand Down Expand Up @@ -473,8 +473,8 @@ def drop_create_vector_index(self, isVectorIndexExist):
embeddings, dimension = load_embedding_model(embedding_model)

if isVectorIndexExist == 'true':
self.graph.query("""drop index vector""")
# self.graph.query("""drop index vector""")
self.graph.query("""drop index vector""",session_params={"database":self.graph._database})

self.graph.query("""CREATE VECTOR INDEX `vector` if not exists for (c:Chunk) on (c.embedding)
OPTIONS {indexConfig: {
`vector.dimensions`: $dimensions,
Expand All @@ -483,7 +483,7 @@ def drop_create_vector_index(self, isVectorIndexExist):
""",
{
"dimensions" : dimension
}
},session_params={"database":self.graph._database}
)
return "Drop and Re-Create vector index succesfully"

Expand Down
5 changes: 4 additions & 1 deletion backend/src/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,16 @@ async def get_graph_document_list(
else:
node_properties = ["description"]
relationship_properties = ["description"]
TOOL_SUPPORTED_MODELS = {"qwen3", "deepseek"}
model_name = llm.model_name.lower()
ignore_tool_usage = not any(pattern in model_name for pattern in TOOL_SUPPORTED_MODELS)
llm_transformer = LLMGraphTransformer(
llm=llm,
node_properties=node_properties,
relationship_properties=relationship_properties,
allowed_nodes=allowedNodes,
allowed_relationships=allowedRelationship,
ignore_tool_usage=True,
ignore_tool_usage=ignore_tool_usage,
additional_instructions=ADDITIONAL_INSTRUCTIONS+ (additional_instructions if additional_instructions else "")
)

Expand Down
67 changes: 34 additions & 33 deletions backend/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,39 +665,40 @@ def upload_file(graph, model, chunk, chunk_number:int, total_chunks:int, origina
return f"Chunk {chunk_number}/{total_chunks} saved"

def get_labels_and_relationtypes(uri, userName, password, database):
excluded_labels = {'Document', 'Chunk', '_Bloom_Perspective_', '__Community__', '__Entity__', 'Session', 'Message'}
excluded_relationships = {
'PART_OF', 'NEXT_CHUNK', 'HAS_ENTITY', '_Bloom_Perspective_', 'FIRST_CHUNK',
'SIMILAR', 'IN_COMMUNITY', 'PARENT_COMMUNITY', 'NEXT', 'LAST_MESSAGE'}
driver = get_graphDB_driver(uri, userName, password,database)
with driver.session(database=database) as session:
result = session.run("CALL db.schema.visualization() YIELD nodes, relationships RETURN nodes, relationships")
if not result:
return []
record = result.single()
nodes = record["nodes"]
relationships = record["relationships"]
node_map = {}
for node in nodes:
node_id = node.element_id
labels = list(node.labels)
if labels:
node_map[node_id] = ":".join(labels)
triples = []
for rel in relationships:
start_id = rel.start_node.element_id
end_id = rel.end_node.element_id
rel_type = rel.type
start_label = node_map.get(start_id)
end_label = node_map.get(end_id)
if start_label and end_label:
if (
start_label not in excluded_labels and
end_label not in excluded_labels and
rel_type not in excluded_relationships
):
triples.append(f"{start_label}-{rel_type}->{end_label}")
return {"triplets" : list(set(triples))}
excluded_labels = {'Document', 'Chunk', '_Bloom_Perspective_', '__Community__', '__Entity__', 'Session', 'Message'}
excluded_relationships = {
'NEXT_CHUNK', '_Bloom_Perspective_', 'FIRST_CHUNK',
'SIMILAR', 'IN_COMMUNITY', 'PARENT_COMMUNITY', 'NEXT', 'LAST_MESSAGE'
}
driver = get_graphDB_driver(uri, userName, password,database)
triples = set()
with driver.session(database=database) as session:
result = session.run("""
MATCH (n)-[r]->(m)
RETURN DISTINCT labels(n) AS fromLabels, type(r) AS relType, labels(m) AS toLabels
""")
for record in result:
from_labels = record["fromLabels"]
to_labels = record["toLabels"]
rel_type = record["relType"]
from_label = next((lbl for lbl in from_labels if lbl not in excluded_labels), None)
to_label = next((lbl for lbl in to_labels if lbl not in excluded_labels), None)
if not from_label or not to_label:
continue
if rel_type == 'PART_OF':
if from_label == 'Chunk' and to_label == 'Document':
continue
elif rel_type == 'HAS_ENTITY':
if from_label == 'Chunk':
continue
elif (
from_label in excluded_labels or
to_label in excluded_labels or
rel_type in excluded_relationships
):
continue
triples.add(f"{from_label}-{rel_type}->{to_label}")
return {"triplets": list(triples)}

def manually_cancelled_job(graph, filenames, source_types, merged_dir, uri):

Expand Down
4 changes: 2 additions & 2 deletions backend/src/make_relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def create_relation_between_chunks(graph, file_name, chunks: List[Document])->li
def create_chunk_vector_index(graph):
start_time = time.time()
try:
vector_index_query = "SHOW INDEXES YIELD * WHERE labelsOrTypes = ['Chunk'] and type = 'VECTOR' AND name = 'vector' return options"
vector_index_query = "SHOW INDEXES YIELD name, type, labelsOrTypes, properties WHERE name = 'vector' AND type = 'VECTOR' AND 'Chunk' IN labelsOrTypes AND 'embedding' IN properties RETURN name"
vector_index = execute_graph_query(graph,vector_index_query)
if not vector_index:
vector_store = Neo4jVector(embedding=EMBEDDING_FUNCTION,
Expand All @@ -168,7 +168,7 @@ def create_chunk_vector_index(graph):
else:
logging.info(f"Index already exist,Skipping creation. Time taken: {time.time() - start_time:.2f} seconds")
except Exception as e:
if "EquivalentSchemaRuleAlreadyExists" in str(e):
if ("EquivalentSchemaRuleAlreadyExists" in str(e) or "An equivalent index already exists" in str(e)):
logging.info("Vector index already exists, skipping creation.")
else:
raise
32 changes: 18 additions & 14 deletions frontend/index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="194x194" href="/favicons/favicon-194x194.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<title>Neo4j graph builder</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="194x194" href="/favicons/favicon-194x194.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicons/favicon-16x16.png">
<link rel="shortcut icon" href="/favicons/favicon.ico">
<title>Neo4j graph builder</title>
</head>

<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>

</body>

</html>
10 changes: 5 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
},
"dependencies": {
"@auth0/auth0-react": "^2.2.4",
"@emotion/styled": "^11.11.0",
"@emotion/styled": "^11.14.0",
"@mui/material": "^5.15.10",
"@mui/styled-engine": "^7.0.1",
"@mui/styled-engine": "^7.0.2",
"@neo4j-devtools/word-color": "^0.0.8",
"@neo4j-ndl/base": "^3.2.9",
"@neo4j-ndl/react": "^3.2.18",
"@neo4j-nvl/base": "^0.3.6",
"@neo4j-nvl/react": "^0.3.7",
"@react-oauth/google": "^0.12.1",
"@tanstack/react-table": "^8.20.5",
"@types/uuid": "^9.0.7",
"@types/uuid": "^10.0.0",
"axios": "^1.8.4",
"clsx": "^2.1.1",
"eslint-plugin-react": "^7.37.4",
Expand All @@ -50,13 +50,13 @@
"eslint": "^8.45.0",
"eslint-config-prettier": "^10.1.1",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"eslint-plugin-react-refresh": "^0.4.20",
"husky": "^9.1.7",
"lint-staged": "^15.5.0",
"postcss": "^8.5.3",
"prettier": "^3.5.3",
"react-dropzone": "^14.3.8",
"tailwindcss": "^4.0.7",
"tailwindcss": "^4.1.5",
"typescript": "^5.7.3",
"vite": "^4.5.3"
}
Expand Down
Loading