Skip to content

Commit 0d09547

Browse files
Minor changes (#798)
* added congig variable for default diffbot chat model * fulltext index creation is skipped when the labels are empty * entity vector change * added optinal to communities for entity mode * updated the entity query --------- Co-authored-by: kartikpersistent <[email protected]>
1 parent c1e305e commit 0d09547

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

backend/src/post_processing.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,12 @@ def create_fulltext(driver,type):
9090
for label in FILTER_LABELS:
9191
if label in labels:
9292
labels.remove(label)
93-
94-
labels_str = ":" + "|".join([f"`{label}`" for label in labels])
95-
logging.info(f"Fetched labels in {time.time() - start_step:.2f} seconds.")
93+
if labels:
94+
labels_str = ":" + "|".join([f"`{label}`" for label in labels])
95+
logging.info(f"Fetched labels in {time.time() - start_step:.2f} seconds.")
96+
else:
97+
logging.info("Full text index is not created as labels are empty")
98+
return
9699
except Exception as e:
97100
logging.error(f"Failed to fetch labels: {e}")
98101
return

backend/src/shared/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
383383
collect {{
384384
UNWIND nodes AS n
385-
MATCH (n)-[:IN_COMMUNITY]->(c:__Community__)
385+
OPTIONAL MATCH (n)-[:IN_COMMUNITY]->(c:__Community__)
386386
WITH c, c.community_rank AS rank, c.weight AS weight
387387
RETURN c
388388
ORDER BY rank, weight DESC
@@ -477,7 +477,7 @@
477477
}
478478
] AS chunks,
479479
[
480-
community IN communities |
480+
community IN communities WHERE community IS NOT NULL |
481481
community {
482482
.*,
483483
embedding: null

frontend/src/components/ChatBot/ChatModeToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default function ChatModeToggle({
4848
return isGdsActive && isCommunityAllowed
4949
? AvailableModes
5050
: AvailableModes?.filter(
51-
(m) => !m.mode.includes(chatModeLables.entity_vector) && !m.mode.includes(chatModeLables.global_vector)
51+
(m) => !m.mode.includes(chatModeLables.global_vector)
5252
);
5353
}, [isGdsActive, isCommunityAllowed]);
5454
const menuItems = useMemo(() => {

0 commit comments

Comments
 (0)