Skip to content

Commit

Permalink
Changes to make graphrag ui work
Browse files Browse the repository at this point in the history
Signed-off-by: theresa <[email protected]>
  • Loading branch information
ichbinblau committed Nov 13, 2024
1 parent 3cd7675 commit e7efac2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 5 additions & 1 deletion GraphRAG/graphrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ def align_outputs(self, data, cur_node, inputs, runtime_graph, llm_parameters_di
# handle template
# if user provides template, then format the prompt with it
# otherwise, use the default template
prompt = inputs.messages[0]["content"]
print("outputs before align:\n", inputs)
if isinstance(inputs.messages, str):
prompt = inputs.messages
else:
prompt = inputs.messages[0]["content"]
chat_template = llm_parameters_dict["chat_template"]
if chat_template:
prompt_template = PromptTemplate.from_template(chat_template)
Expand Down
3 changes: 1 addition & 2 deletions GraphRAG/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

set -e
set -xe
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
Expand All @@ -11,7 +11,6 @@ export REGISTRY=${IMAGE_REPO}
export TAG=${IMAGE_TAG}

WORKPATH=$(dirname "$PWD")
WORKPATH=/home/rbrugaro/GenAIExamples/GraphRAG
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')

Expand Down
2 changes: 1 addition & 1 deletion GraphRAG/ui/svelte/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CHAT_BASE_URL = '/v1/chatqna'
CHAT_BASE_URL = '/v1/graphrag'

UPLOAD_FILE_BASE_URL = '/v1/dataprep'

Expand Down
2 changes: 1 addition & 1 deletion GraphRAG/ui/svelte/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
>
<div class="mx-auto flex h-full w-full flex-col sm:mt-0 sm:w-[72%]">
<div class="flex justify-between p-2">
<p class="text-[1.7rem] font-bold tracking-tight">ChatQnA</p>
<p class="text-[1.7rem] font-bold tracking-tight">GraphRAG</p>
<UploadFile />
</div>
<div
Expand Down

0 comments on commit e7efac2

Please sign in to comment.