Skip to content

Commit 6d6d2bc

Browse files
added Hybrid Chat modes (#670)
1 parent aa7dfb7 commit 6d6d2bc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

backend/src/QA_integration_new.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ def QA_RAG(graph, model, question, document_names,session_id, mode):
374374
"user": "chatbot"
375375
}
376376
return result
377-
elif mode == "vector":
377+
elif mode == "vector" or mode == "hybrid":
378378
retrieval_query = VECTOR_SEARCH_QUERY
379379
else:
380380
retrieval_query = VECTOR_GRAPH_SEARCH_QUERY.format(no_of_entites=VECTOR_GRAPH_SEARCH_ENTITY_LIMIT)

frontend/src/components/ChatBot/ChatModeToggle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function ChatModeToggle({
3131
() =>
3232
chatModes?.map((m) => {
3333
return {
34-
title: m.includes('+') ? 'Graph + Vector' : capitalize(m),
34+
title: capitalize(m),
3535
onClick: () => {
3636
setchatMode(m);
3737
},

frontend/src/utils/Constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const defaultLLM = llms?.includes('openai-gpt-4o-mini')
5959
export const chatModes =
6060
process.env?.CHAT_MODES?.trim() != ''
6161
? process.env.CHAT_MODES?.split(',')
62-
: ['vector', 'graph', 'graph+vector', 'hybrid'];
62+
: ['vector', 'graph', 'graph+vector', 'hybrid','hybrid+graph'];
6363
export const chunkSize = process.env.CHUNK_SIZE ? parseInt(process.env.CHUNK_SIZE) : 1 * 1024 * 1024;
6464
export const timeperpage = process.env.TIME_PER_PAGE ? parseInt(process.env.TIME_PER_PAGE) : 50;
6565
export const timePerByte = 0.2;

0 commit comments

Comments
 (0)