Skip to content

DEV to STAGING #833

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 265 commits into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
265 commits
Select commit Hold shift + click to select a range
edcff3b
updated script"integration test cases"
abhishekkumar-27 Aug 21, 2024
71ed29a
decreased the delay for pollintg API
kartikpersistent Aug 21, 2024
7eb7605
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Aug 21, 2024
1af5877
Graph enhancements (#696)
prakriti-solankey Aug 21, 2024
4575198
changed chat mode names (#702)
vasanthasaikalluri Aug 21, 2024
2d76462
Merge branch 'STAGING' into DEV
prakriti-solankey Aug 21, 2024
a6ee345
env changes
kartikpersistent Aug 21, 2024
dc351a0
used axios instance for network calls
kartikpersistent Aug 22, 2024
a241c6b
disabled the toolip when dropdown is open state
kartikpersistent Aug 22, 2024
426906b
format fixes + chat mode naming changes
kartikpersistent Aug 22, 2024
78ec3fd
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Aug 22, 2024
7d0b431
mode added to info model for entities
prakriti-solankey Aug 22, 2024
e60a6e3
Merge branch 'STAGING' into DEV
prakriti-solankey Aug 22, 2024
f2b1e17
Issue fixed, List out of index while getting status of dicuement node
praveshkumar1988 Aug 26, 2024
94c493e
processing count updated on cancel
kartikpersistent Aug 26, 2024
489b5ae
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Aug 26, 2024
3ef88b6
format fixes
kartikpersistent Aug 27, 2024
4e2f909
Merge branch 'STAGING' into DEV
kartikpersistent Aug 27, 2024
dadaa28
remove whitespace for enviroment variable which due to an error "xxx …
edenbuaa Aug 27, 2024
4c6f676
updated disconnected nodes
abhishekkumar-27 Aug 27, 2024
568db51
updated disconnected nodes
abhishekkumar-27 Aug 27, 2024
501ec6b
fix: Processed count update on failed condition
kartikpersistent Aug 28, 2024
9941474
added disconnected and up nodes
abhishekkumar-27 Aug 28, 2024
8ae3b99
removed __Entity__ labels
vasanthasaikalluri Aug 28, 2024
450ba6f
removed graph_object
vasanthasaikalluri Aug 28, 2024
266c812
removed graph object in the function
vasanthasaikalluri Aug 28, 2024
cac1963
resetting the alert message on success scenario
kartikpersistent Aug 29, 2024
fd7a4bb
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Aug 29, 2024
43ec569
Modified queries
vasanthasaikalluri Aug 29, 2024
d010e41
populate graph schema
abhishekkumar-27 Aug 30, 2024
b3a00ac
not clearing the password when there is error scenario
kartikpersistent Aug 30, 2024
77b06db
fixed the vector index loading issue
kartikpersistent Aug 30, 2024
d166290
fix: empty credentials payload for recreate vector index api
kartikpersistent Aug 30, 2024
088eda2
chatbot status (#676)
prakriti-solankey Sep 2, 2024
dbfe2a7
added properties and modified to entity labels
vasanthasaikalluri Sep 2, 2024
3d25d78
Post processing call after all files completion (#716)
kartikpersistent Sep 3, 2024
8baedb0
modified the summary creation
vasanthasaikalluri Sep 3, 2024
87a9321
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
vasanthasaikalluri Sep 3, 2024
c666c36
fixed the summary creation
vasanthasaikalluri Sep 3, 2024
c159322
Configuration change. Update LLM models and remove --preload from doc…
praveshkumar1988 Sep 3, 2024
e08aeab
Retry processing (#698)
kartikpersistent Sep 4, 2024
0cb7ed9
ref added for keydown (#717)
prakriti-solankey Sep 4, 2024
18b0093
Remove total_pages propert. It is not used in DB. (#714)
praveshkumar1988 Sep 4, 2024
eb48190
Update main.py
aashipandya Sep 4, 2024
5ff0014
Add print statement for document status
praveshkumar1988 Sep 5, 2024
8215abd
refactored qa integration
vasanthasaikalluri Sep 5, 2024
6ba42e0
allow credentials true changes
kartikpersistent Sep 5, 2024
771753b
reset the values to 0 when the retry option is start from begining
kartikpersistent Sep 5, 2024
d56a60d
Update Node/Document status using SSE, Trying to fix Cancelled by Sco…
praveshkumar1988 Sep 5, 2024
949d2f9
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
praveshkumar1988 Sep 5, 2024
3f98459
modified the chat mode settings
vasanthasaikalluri Sep 5, 2024
09b0180
renamed QA_integration
vasanthasaikalluri Sep 5, 2024
19b7bf2
added graphdatascience
vasanthasaikalluri Sep 5, 2024
c91febb
moved settings to constants
vasanthasaikalluri Sep 5, 2024
169c272
modified constants
vasanthasaikalluri Sep 5, 2024
ba13144
resetting the nodescount and relationshipcount
kartikpersistent Sep 6, 2024
4cc8104
Add vector index exist condition to create
praveshkumar1988 Sep 6, 2024
122f6a6
Merge branch 'STAGING' into DEV
aashipandya Sep 6, 2024
1222942
Science Molecule & database icon addition (#722)
prakriti-solankey Sep 6, 2024
0c278de
Add communities check and show respective chat modes (#729)
kartikpersistent Sep 6, 2024
7ff05cc
youtube transcript issue (#736)
praveshkumar1988 Sep 9, 2024
13c7bc8
added chnages to graph schema
abhishekkumar-27 Sep 9, 2024
a12b7cd
added local search
vasanthasaikalluri Sep 10, 2024
0469138
725 add checkbox for create communities (#728)
prakriti-solankey Sep 11, 2024
177f6c8
modified local search query
vasanthasaikalluri Sep 11, 2024
36c9dd3
added entity details for chat
vasanthasaikalluri Sep 11, 2024
1aaeab6
modified chunkids
vasanthasaikalluri Sep 11, 2024
ebb4c91
modified chunk_entities
vasanthasaikalluri Sep 11, 2024
c72962c
Add communities Checkbox to graph viz (#739)
prakriti-solankey Sep 11, 2024
1ef2e29
Merge branch 'graph_communities' of https://github.com/neo4j-labs/llm…
prakriti-solankey Sep 12, 2024
2d4c35a
Added time to process file in extract API and it's functions
praveshkumar1988 Sep 12, 2024
ef77b50
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Sep 12, 2024
29205dc
Add Severity level in cloud logging
praveshkumar1988 Sep 12, 2024
fd12e9a
changed name
vasanthasaikalluri Sep 12, 2024
21dd283
modified the query
vasanthasaikalluri Sep 12, 2024
ccfabc7
updated entities param
vasanthasaikalluri Sep 12, 2024
dde29f2
added document to details
vasanthasaikalluri Sep 13, 2024
82be95b
format fixes
kartikpersistent Sep 13, 2024
93a4698
added global embedding
vasanthasaikalluri Sep 13, 2024
7740336
Merge branch 'DEV' into communities
prakriti-solankey Sep 13, 2024
7e0f1c8
added database
vasanthasaikalluri Sep 13, 2024
1c302cb
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
vasanthasaikalluri Sep 13, 2024
d1eda2b
added database
vasanthasaikalluri Sep 13, 2024
3c0a5df
modified is_entity
vasanthasaikalluri Sep 13, 2024
9e34919
modifies chunk entities
vasanthasaikalluri Sep 16, 2024
fa1ca36
Added secweb to fix security issues
praveshkumar1988 Sep 16, 2024
62f454d
removed QA integration
vasanthasaikalluri Sep 16, 2024
4c7821e
created neo4j from existing index
vasanthasaikalluri Sep 16, 2024
4206ec0
modified script
abhishekkumar-27 Sep 16, 2024
801745e
Integrate local search to chat details (#746)
prakriti-solankey Sep 16, 2024
596cdb7
Merge branch 'STAGING' into DEV
prakriti-solankey Sep 16, 2024
107f065
removal of unused code
prakriti-solankey Sep 16, 2024
8f0a706
removed entity label
vasanthasaikalluri Sep 16, 2024
bc09b86
Added Description to chat mode menu (#743)
prakriti-solankey Sep 16, 2024
337cd25
Update log_struct method to add severity
praveshkumar1988 Sep 16, 2024
dd89e0b
community check
prakriti-solankey Sep 16, 2024
6ed968d
Entity Empty Label fix and Icon
kartikpersistent Sep 17, 2024
9237847
Update Utils.ts
prakriti-solankey Sep 17, 2024
5f2290b
Retry processing - node and rels count update condition for start fro…
aashipandya Sep 17, 2024
fec0d1e
uncommented the Retry Processing
kartikpersistent Sep 17, 2024
dff7535
removed __Entity__ labels
vasanthasaikalluri Sep 17, 2024
e3bcf2b
spell fix
kartikpersistent Sep 17, 2024
a86dd12
fixed postprocessing method invoking issue for odd no files
kartikpersistent Sep 18, 2024
ba0957e
lint fix
kartikpersistent Sep 18, 2024
3fecf70
Added filesource and name in chunks
kartikpersistent Sep 18, 2024
d6b2e6a
Merge branch 'DEV' into communities
kartikpersistent Sep 18, 2024
57550b7
Preload=True remove from HSTS
praveshkumar1988 Sep 18, 2024
1695f19
Graph communities (#748)
prakriti-solankey Sep 18, 2024
f0810c7
aria label addition
prakriti-solankey Sep 18, 2024
a1dce53
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Sep 18, 2024
869c87e
code improvements used URL class for host url check
kartikpersistent Sep 19, 2024
b2097e5
host level check
kartikpersistent Sep 19, 2024
3819118
Update Security header
praveshkumar1988 Sep 19, 2024
1246b41
encryption of localstorage values
kartikpersistent Sep 19, 2024
0ec6846
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
prakriti-solankey Sep 19, 2024
1709a16
'mode-selection-changes'
prakriti-solankey Sep 19, 2024
f84e5c3
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
prakriti-solankey Sep 19, 2024
389fa7f
added local chat history
vasanthasaikalluri Sep 19, 2024
4756647
Merge branch 'DEV' into communities
kartikpersistent Sep 19, 2024
9210bf8
added neo4j from existing index to entity vector mode
vasanthasaikalluri Sep 19, 2024
2711b0c
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
vasanthasaikalluri Sep 19, 2024
b5b8545
label changes
prakriti-solankey Sep 19, 2024
6d9ae8a
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
prakriti-solankey Sep 19, 2024
adf4106
commented security header
praveshkumar1988 Sep 19, 2024
8b6b930
Merge branch 'DEV' into communities
kartikpersistent Sep 20, 2024
060fd2d
Communities (#721)
prakriti-solankey Sep 20, 2024
cc62f50
added global env for communities
vasanthasaikalluri Sep 20, 2024
92450eb
Merge branch 'communities' of https://github.com/neo4j-labs/llm-graph…
prakriti-solankey Sep 20, 2024
3732c38
comment all security header
praveshkumar1988 Sep 20, 2024
763dedf
added threading to chat summarization to improve chat response time (…
vasanthasaikalluri Sep 20, 2024
27272f4
formatted the queries and added logic for empty label (#752)
vasanthasaikalluri Sep 20, 2024
00730d3
Commented youtube google api code
praveshkumar1988 Sep 20, 2024
8d210f6
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
praveshkumar1988 Sep 20, 2024
48c9f20
added the error handling for passowrd decrypt error
kartikpersistent Sep 23, 2024
9d89cb2
wordings changes
kartikpersistent Sep 24, 2024
69109f9
Exclude default labels from get_labels_and_relationtypes
praveshkumar1988 Sep 24, 2024
d41a920
Post-Processing-Alerts (#758)
kartikpersistent Sep 24, 2024
5303f5c
added write access check
vasanthasaikalluri Sep 25, 2024
91a4d30
added write access param
vasanthasaikalluri Sep 25, 2024
2ab06d6
added fulltext creation
vasanthasaikalluri Sep 25, 2024
9414f31
disabled the write and delete actions for read only user mode
kartikpersistent Sep 26, 2024
85112a9
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Sep 26, 2024
f116300
modified query
vasanthasaikalluri Sep 26, 2024
dbb77d6
test updates
abhishekkumar-27 Sep 23, 2024
6d0e18b
test uupdated
abhishekkumar-27 Sep 26, 2024
db02bfa
Read Only User Support (#766)
kartikpersistent Sep 26, 2024
c7460de
storing the gds status and write access on refresh
kartikpersistent Sep 26, 2024
501ece4
Merge branch 'local_chat_history' of https://github.com/neo4j-labs/ll…
kartikpersistent Sep 26, 2024
ba6a9d2
Langchain libs update (#769)
aashipandya Sep 27, 2024
3c2e344
fixed the rerendering of the table while file status is processing
kartikpersistent Sep 27, 2024
292ae9e
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Sep 27, 2024
0d93f57
fix: Read Only User Fix
kartikpersistent Sep 27, 2024
dc994a2
Global search fulltext (#767)
prakriti-solankey Sep 27, 2024
1180406
Added elapsed time for extarction on each breakdown function
praveshkumar1988 Sep 27, 2024
9206fc8
lint and format fixes
prakriti-solankey Sep 27, 2024
34537f7
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Sep 27, 2024
0405816
removed dev logs
kartikpersistent Sep 27, 2024
c9844b7
communities fix
prakriti-solankey Sep 27, 2024
e4c3349
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Sep 27, 2024
085a0e4
disabled the generate graph for read only user
kartikpersistent Sep 27, 2024
7813750
format fixes
kartikpersistent Sep 27, 2024
7cb7957
graph labels change
prakriti-solankey Sep 27, 2024
b7559ac
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Sep 27, 2024
e0e97fb
added the readonly check for already added waiting files
kartikpersistent Sep 27, 2024
42f4c82
Retriever evaluation using RAGAS
kaustubh-darekar Sep 27, 2024
c8e8387
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kaustubh-darekar Sep 27, 2024
e189ccd
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Sep 27, 2024
b663ff4
deleted unused file
kartikpersistent Sep 30, 2024
7c65344
code optimization using memo
kartikpersistent Sep 30, 2024
c69b708
Added elapsed_time on each api and getiing time per_entity
praveshkumar1988 Sep 30, 2024
393c53c
Added the post processing Alert showcasing the ongoing post processin…
kartikpersistent Oct 1, 2024
0dec005
fix: readonly user retry option disable
kartikpersistent Oct 1, 2024
ac3d88a
update script to get details of extarcted doc
abhishekkumar-27 Oct 3, 2024
83351ac
Issue fixed, Latency count per entity
praveshkumar1988 Oct 3, 2024
178dacb
Multiple chat modes selection (#780)
kartikpersistent Oct 4, 2024
1a33f0d
Fix: ChatModes DeSelection on FIle Selection
kartikpersistent Oct 7, 2024
e576055
Fix: Order of the chatmodes accordoing to selected chatmodes
kartikpersistent Oct 7, 2024
d1a56ca
Community optimization (#790)
vasanthasaikalluri Oct 9, 2024
7f255ee
Async way to create entities from multiple chunks (#788)
aashipandya Oct 9, 2024
943f539
fixed graph mode error (#792)
vasanthasaikalluri Oct 10, 2024
126dd48
Raga's Evaluation Metrics (#787)
kartikpersistent Oct 10, 2024
b8296e9
Openai gemini config (#794)
aashipandya Oct 10, 2024
b04f382
Added the user action for metrics table
kartikpersistent Oct 10, 2024
6aa84c7
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Oct 10, 2024
f97806c
Graph enhancements (#795)
prakriti-solankey Oct 10, 2024
ba95afd
format changes
prakriti-solankey Oct 10, 2024
0cc118d
Communities Bug fixes (#775)
prakriti-solankey Oct 10, 2024
fcb9ab5
llm name changes
kartikpersistent Oct 11, 2024
f505488
build fix
kartikpersistent Oct 11, 2024
37de220
default mode fix
kartikpersistent Oct 11, 2024
a538226
ragas model names update
kaustubh-darekar Oct 11, 2024
784caa6
lint fixes
kartikpersistent Oct 11, 2024
b814f71
Chunk Entities API condition
kartikpersistent Oct 11, 2024
69793a6
added the tooltip for unsupported lllms for ragas metric loading
kartikpersistent Oct 11, 2024
c5a3dbf
removed unused imports
kartikpersistent Oct 11, 2024
acdc886
multimode fix when we get error response
kartikpersistent Oct 11, 2024
2734c4a
mode changes for score display
prakriti-solankey Oct 11, 2024
cbd3f25
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
prakriti-solankey Oct 11, 2024
a12a6ab
fix: Fixed the details state handling between multiple chats
kartikpersistent Oct 15, 2024
ba091a0
Fix: Entity Mode Width Fix
kartikpersistent Oct 15, 2024
93c3dd3
diffbot fix for async (#797)
aashipandya Oct 15, 2024
821b0f4
Minor changes (#798)
vasanthasaikalluri Oct 15, 2024
702ebf7
New: Added the supported llm models for ragas evaluation
kartikpersistent Oct 15, 2024
3f1633c
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Oct 15, 2024
dcb3975
Fix: Communitites Tab is displayed based communitites length
kartikpersistent Oct 15, 2024
d3e5365
added the conversation download button (#800)
kartikpersistent Oct 15, 2024
0ff8bd1
model name correction
prakriti-solankey Oct 15, 2024
441908b
Merge branch 'STAGING' into DEV
prakriti-solankey Oct 15, 2024
09ea071
chatmode switch mode fix
kartikpersistent Oct 17, 2024
99dc052
Add API payload GCP logging (#805)
praveshkumar1988 Oct 18, 2024
a8f821a
Adding Links to get neighboring nodes (#796)
prakriti-solankey Oct 18, 2024
6c6da26
added error message for doc retriver (#807)
vasanthasaikalluri Oct 18, 2024
3d587f0
copy row (#803)
prakriti-solankey Oct 18, 2024
845bfb7
Raga's Evaluation For Multi Modes (#806)
kartikpersistent Oct 18, 2024
952291d
lint fixes
kartikpersistent Oct 18, 2024
f5a5edd
fix: multimode metrics state handling
kartikpersistent Oct 21, 2024
b3f1dd0
fix: Multimode metrics mode change state issue
kartikpersistent Oct 21, 2024
fb5e000
fix: list style fix
kartikpersistent Oct 21, 2024
fd224a1
Correct TYPO mistake
praveshkumar1988 Oct 21, 2024
cb77c18
added new env for ragas embedding model
vasanthasaikalluri Oct 21, 2024
986ae29
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
vasanthasaikalluri Oct 21, 2024
30d6ea8
Merge branch 'STAGING' into DEV
praveshkumar1988 Oct 21, 2024
5c0081e
Props name changes (#811)
kartikpersistent Oct 22, 2024
ee71002
test
prakriti-solankey Oct 22, 2024
c115014
view graph
prakriti-solankey Oct 22, 2024
c200b61
nodes count and relationshipcount updation fix
kartikpersistent Oct 22, 2024
1cc81ce
Merge branch 'STAGING' into DEV
kartikpersistent Oct 22, 2024
340679b
sourceUrl Fix
kartikpersistent Oct 22, 2024
055e40f
Merge branch 'DEV' of https://github.com/neo4j-labs/llm-graph-builder…
kartikpersistent Oct 22, 2024
fb35bda
empty string "" fix to keep the default values we should keep the val…
kartikpersistent Oct 23, 2024
ed18462
prop changes
kartikpersistent Oct 23, 2024
985993e
props changes
kartikpersistent Oct 23, 2024
220bee7
retry condition update for failed files (#820)
aashipandya Oct 23, 2024
0508585
Chat modes name changes (#815)
kartikpersistent Oct 23, 2024
9dba361
Youtube transcript fix with proxy (#822)
aashipandya Oct 23, 2024
6839e52
update script for async func
abhishekkumar-27 Oct 23, 2024
a5d29fa
ragas changes for graph retrieval mode. context added in api output (…
kaustubh-darekar Oct 24, 2024
cb59a2a
Remove extract latency from logging and add LIMIT in duplicate nodes
praveshkumar1988 Oct 24, 2024
93d7f3b
Document updates (#828)
kaustubh-darekar Oct 24, 2024
0d2882c
Update README.md
kartikpersistent Oct 24, 2024
6a6dc05
updated api structire in docs (#827)
vasanthasaikalluri Oct 24, 2024
29ef09b
Update backend_docs.adoc
karanchellani Oct 24, 2024
c5cd025
821 llm model listing (#823)
prakriti-solankey Oct 24, 2024
dfbb042
Merge branch 'STAGING' into DEV
kartikpersistent Oct 24, 2024
4bed352
Exclude session lable node from duplicate nodes list
praveshkumar1988 Oct 25, 2024
3dfb42b
Added the tooltip for disabled llm option (#835)
kartikpersistent Oct 25, 2024
4d795bf
node size changes
prakriti-solankey Oct 25, 2024
1fac375
mode removal of rows check
prakriti-solankey Oct 25, 2024
eb14fbe
formatting
prakriti-solankey Oct 25, 2024
0331cc7
Merge branch 'STAGING' into DEV
prakriti-solankey Oct 25, 2024
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
2 changes: 1 addition & 1 deletion backend/src/graphDB_dataAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def get_duplicate_nodes_list(self):
score_value = float(os.environ.get('DUPLICATE_SCORE_VALUE'))
text_distance = int(os.environ.get('DUPLICATE_TEXT_DISTANCE'))
query_duplicate_nodes = """
MATCH (n:!Chunk&!Document&!`__Community__`) with n
MATCH (n:!Chunk&!Session&!Document&!`__Community__`) with n
WHERE n.embedding is not null and n.id is not null // and size(toString(n.id)) > 3
WITH n ORDER BY count {{ (n)--() }} DESC, size(toString(n.id)) DESC // updated
WITH collect(n) as nodes
Expand Down
93 changes: 42 additions & 51 deletions frontend/src/components/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Dropdown, Tip } from '@neo4j-ndl/react';
import { Dropdown, Tip, useMediaQuery } from '@neo4j-ndl/react';
import { OptionType, ReusableDropdownProps } from '../types';
import { memo, useMemo, useReducer } from 'react';
import { memo, useMemo } from 'react';
import { capitalize, capitalizeWithUnderscore } from '../utils/Utils';
// import { LLMDropdownLabel } from '../utils/Constants';
import { prodllms } from '../utils/Constants';
const DropdownComponent: React.FC<ReusableDropdownProps> = ({
options,
placeholder,
Expand All @@ -13,64 +13,55 @@ const DropdownComponent: React.FC<ReusableDropdownProps> = ({
isDisabled,
value,
}) => {
const [disableTooltip, toggleDisableState] = useReducer((state) => !state, false);
const isProdEnv = process.env.VITE_ENV === 'PROD';
const supportedModels = process.env.VITE_LLM_MODELS_PROD;
const isLargeDesktop = useMediaQuery(`(min-width:1440px )`);
const handleChange = (selectedOption: OptionType | null | void) => {
onSelect(selectedOption);
};
const allOptions = useMemo(() => options, [options]);
return (
<>
<div className={view === 'ContentView' ? 'w-[150px]' : ''}>
<Tip allowedPlacements={['top']} isDisabled={disableTooltip}>
<Tip.Trigger>
<Dropdown
type='select'
aria-label='A selection dropdown'
label='LLM Models'
selectProps={{
onChange: handleChange,
options: allOptions?.map((option) => {
const label =
typeof option === 'string' ? capitalizeWithUnderscore(option) : capitalize(option.label);
const value = typeof option === 'string' ? option : option.value;
const isModelSupported = !isProdEnv || supportedModels?.includes(value);
return {
label,
value,
isDisabled: !isModelSupported,
};
}),
placeholder: placeholder || 'Select an option',
defaultValue: defaultValue
? { label: capitalizeWithUnderscore(defaultValue), value: defaultValue }
: undefined,
menuPlacement: 'auto',
isDisabled: isDisabled,
value: value,
onMenuOpen: () => {
toggleDisableState();
},
onMenuClose: () => {
toggleDisableState();
},
}}
size='medium'
fluid
/>
</Tip.Trigger>
<Tip.Content>LLM Model used for Extraction & Chat</Tip.Content>
</Tip>
<Dropdown
type='select'
aria-label='A selection dropdown'
label='LLM Models'
helpText={<div className='!w-max'> LLM Model used for Extraction & Chat</div>}
selectProps={{
onChange: handleChange,
// @ts-ignore
options: allOptions?.map((option) => {
const label = typeof option === 'string' ? capitalizeWithUnderscore(option) : capitalize(option.label);
const value = typeof option === 'string' ? option : option.value;
const isModelSupported = !isProdEnv || prodllms?.includes(value);
return {
label: !isModelSupported ? (
<Tip allowedPlacements={isLargeDesktop ? ['left'] : ['right']}>
<Tip.Trigger>
<span>{label}</span>
</Tip.Trigger>
<Tip.Content>Available In Development Version</Tip.Content>
</Tip>
) : (
<span>{label}</span>
),
value,
isDisabled: !isModelSupported,
};
}),
placeholder: placeholder || 'Select an option',
defaultValue: defaultValue
? { label: capitalizeWithUnderscore(defaultValue), value: defaultValue }
: undefined,
menuPlacement: 'auto',
isDisabled: isDisabled,
value: value,
}}
size='medium'
fluid
/>
{children}
</div>
{/* {isProdEnv && (<Typography className={'pt-4 absolute top-14 self-start'} variant='body-small'>
{LLMDropdownLabel.disabledModels}
<a href="https://dev-frontend-dcavk67s4a-uc.a.run.app/" target="_blank" style={{ textDecoration: 'underline' }}>
{LLMDropdownLabel.devEnv}
</a>
{'.'}
</Typography>)} */}
</>
);
};
Expand Down
7 changes: 0 additions & 7 deletions frontend/src/components/Graph/GraphViewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,6 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
return {
...node,
selected: match,
size:
match && viewPoint === graphLabels.showGraphView
? 100
: match && viewPoint !== graphLabels.showGraphView
? 50
: graphLabels.nodeSize,
};
});
// deactivating any active relationships
Expand Down Expand Up @@ -439,7 +433,6 @@ const GraphViewModal: React.FunctionComponent<GraphViewModalProps> = ({
newScheme={newScheme}
searchQuery={searchQuery}
setSearchQuery={setSearchQuery}
viewPoint={viewPoint}
setNodes={setNodes}
setRelationships={setRelationships}
/>
Expand Down
8 changes: 0 additions & 8 deletions frontend/src/components/Graph/ResultOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface OverViewProps {
newScheme: Scheme;
searchQuery: string;
setSearchQuery: Dispatch<SetStateAction<string>>;
viewPoint: string;
setNodes: Dispatch<SetStateAction<ExtendedNode[]>>;
setRelationships: Dispatch<SetStateAction<ExtendedRelationship[]>>;
}
Expand All @@ -24,7 +23,6 @@ const ResultOverview: React.FunctionComponent<OverViewProps> = ({
newScheme,
searchQuery,
setSearchQuery,
viewPoint,
setNodes,
setRelationships,
}) => {
Expand Down Expand Up @@ -92,12 +90,6 @@ const ResultOverview: React.FunctionComponent<OverViewProps> = ({
return {
...node,
selected: isActive,
size:
isActive && viewPoint === graphLabels.showGraphView
? 100
: isActive && viewPoint !== graphLabels.showGraphView
? 50
: graphLabels.nodeSize,
};
});
// deactivating any active relationships
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/utils/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export const supportedLLmsForRagas = [
'fireworks_llama_v3_70b',
'bedrock_claude_3_5_sonnet',
];
export const prodllms =
process.env.VITE_LLM_MODELS_PROD?.trim() != ''
? (process.env.VITE_LLM_MODELS_PROD?.split(',') as string[])
: ['openai_gpt_4o', 'openai_gpt_4o_mini', 'diffbot', 'gemini_1.5_flash'];

export const chatModeLables = {
vector: 'vector',
graph: 'graph',
Expand Down Expand Up @@ -140,7 +145,7 @@ export const tooltips = {
};

export const buttonCaptions = {
exploreGraphWithBloom: 'Explore Graph with Bloom',
exploreGraphWithBloom: 'Explore Graph',
showPreviewGraph: 'Preview Graph',
deleteFiles: 'Delete Files',
generateGraph: 'Generate Graph',
Expand Down