Skip to content

Commit

Permalink
Fix docSum ui error in accessing parsed files (#1079)
Browse files Browse the repository at this point in the history
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Signed-off-by: ZePan110 <ze.pan@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
Co-authored-by: Neo Zhang Jianyu <jianyu.zhang@intel.com>
Co-authored-by: ZhangJianyu <zhang.jianyu@outlook.com>
Co-authored-by: XinyaoWa <xinyao.wang@intel.com>
Co-authored-by: ZePan110 <ze.pan@intel.com>
  • Loading branch information
7 people authored Nov 11, 2024
1 parent 82801d0 commit 3744bb8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions DocSum/docker_compose/intel/hpu/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ services:
ports:
- "8008:80"
environment:
HABANA_VISIBLE_DEVICES: all
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
Expand Down
2 changes: 1 addition & 1 deletion DocSum/tests/test_compose_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function main() {

validate_microservices
validate_megaservice
#validate_frontend
validate_frontend

stop_docker
echo y | docker system prune
Expand Down
2 changes: 1 addition & 1 deletion DocSum/tests/test_compose_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ function main() {

validate_microservices
validate_megaservice
#validate_frontend
validate_frontend

stop_docker
echo y | docker system prune
Expand Down
7 changes: 6 additions & 1 deletion DocSum/ui/svelte/src/lib/shared/Network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@ export async function fetchTextStream(query: string | Blob, params: string, file
const url = `${DOC_BASE_URL}`; // Ensure the URL is constructed correctly
const formData = new FormData();

if (params === "doc_id" && file) {
if (!file) {
file = new Blob([""], { type: "text/plain" });
fileName = "empty.txt";
}

if (params === "doc_id") {
formData.append("files", file, fileName);
formData.append("messages", query);
} else if (params === "text") {
Expand Down

0 comments on commit 3744bb8

Please sign in to comment.