Compare commits

..

372 Commits

Author SHA1 Message Date
Zhenzhong1
cc5be6c6a3 add manifests wit wrapper 2024-09-28 20:00:53 -07:00
sri-intel
2de1bfc5bb Bug fix for issue #881 (#882)
Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
2024-09-27 13:06:02 +08:00
sri-intel
75df2c9979 docker install instruction for csp (#843)
Signed-off-by: sri <srinarayan.srikanthan@intel.com>
Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
2024-09-27 13:00:10 +08:00
minmin-intel
62e06a0aff Update DocIndexRetriever Example to allow user passing in retriever/reranker params (#880)
Signed-off-by: minmin-intel <minmin.hou@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-27 10:21:54 +08:00
jotpalch
bd32b03e3c Doc: Update folder path to correct location in "Deploy ChatQnA in Kubernetes" (#875) 2024-09-26 14:38:22 +08:00
xiguiw
9d0b49c2d6 [doc] Update AIPC document (#874)
Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-26 14:28:16 +08:00
XinyaoWa
75ce2a3ca6 remove old knowledgegraphs link (#876)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-09-26 14:23:42 +08:00
David Kinder
99c10933b4 doc: fix doc heading (#873)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-26 12:33:57 +09:00
Pranav Singh
8bcd82e82d [docs] Fixes Typo in Gaudi Docker Images Setup (#868)
Signed-off-by: Pranav Singh <pranav.singh@intel.com>
2024-09-25 17:47:59 +08:00
Zhenzhong1
c1038d2193 [ChatQnA] Deploy ChatQnA for benchmarking with different configurations. (#870) 2024-09-25 16:47:44 +08:00
lvliang-intel
33b9d4e421 Remove redundant code and update tgi version (#871)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-09-25 15:33:33 +08:00
chen, suyue
c9553c6f9a Clean up CI jobs (#872)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-25 14:59:14 +08:00
David Kinder
3e796ba73d doc: fix missing references to README.md (#860)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-24 21:40:42 +08:00
Hoong Tee, Yeoh
5ed776709d [docker_images_list]: Update images information (#864)
Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-24 21:39:42 +08:00
Steve Zhang
954a22051b Make all xeon tgi image version consistent (#851)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-24 11:19:37 +08:00
Hoong Tee, Yeoh
6f4b00f829 Documentation README update for ProductivitySuite example (#863)
Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 22:39:14 +08:00
lvliang-intel
3fb60608b3 Use official tei gaudi image and update tgi gaudi version (#810)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 17:52:56 +08:00
Letong Han
c35fe0b429 [Doc] Update ChatQnA README for Nginx Docker Image (#862)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-23 12:25:30 +09:00
lvliang-intel
28f5e4a268 Add docker based benchmark instructions for ChatQnA (#859)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 10:14:44 +08:00
Letong Han
d55a33dda1 [ProductivitySuite] Fix CD Issue (#858)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-20 16:20:01 +08:00
XinyaoWa
daf2a4fad7 Fix SearchQnA tests bug (#857)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-09-20 16:16:46 +08:00
chen, suyue
3ce395582b print image build test commit (#856)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-20 15:34:04 +08:00
Letong Han
7eaab93d0b [Doc] Refine ChatQnA README (#855)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-20 11:20:20 +08:00
Neo Zhang Jianyu
bc817700b9 refactor the network port setting for AWS (#849)
Co-authored-by: ZhangJianyu <zhang.jianyu@outlook.com>
2024-09-19 21:58:56 +08:00
lvliang-intel
bd811bd622 Add validate microservice details link (#852)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-09-19 21:54:32 +08:00
WenjiaoYue
05f9828e77 Add nginx and UI to the ChatQnA manifest (#848)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 21:04:12 +08:00
Letong Han
6c364487d3 [ChatQnA] Add Nginx in Docker Compose and README (#850)
Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 20:39:58 +08:00
ZePan110
21e215c5d5 Refine code scan output and remove opea_release_data.md. (#844)
Signed-off-by: ZePan110 <ze.pan@intel.com>
2024-09-19 17:34:55 +08:00
Letong Han
a09395e4a4 [Doc] Update CodeGen and Translation READMEs (#847)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-19 16:01:35 +08:00
lkk
f04f061f8c move evaluation scripts (#842)
Co-authored-by: root <root@idc708073.jf.intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 15:59:13 +08:00
Tiep Le
872e93e4bd Handle uncontrolled data path for MultimodalQnA v1.0 release (#845)
Signed-off-by: Tiep Le <tiep.le@intel.com>
2024-09-19 15:45:49 +08:00
XinyaoWa
2f03a3a894 Align parameters for "max_token, repetition_penalty,presence_penalty,frequency_penalty" (#726)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 14:15:25 +08:00
Letong Han
372d78c2ac [Doc] Refine READMEs (#841)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-19 13:25:40 +08:00
Zhenzhong1
933c3d3445 [ChatQnA] Update OOB with wrapper manifests. (#823) 2024-09-19 11:03:10 +08:00
ZePan110
88829c9381 Remove useless folder. (#840)
Signed-off-by: ZePan110 <ze.pan@intel.com>
2024-09-19 10:34:33 +08:00
Malini Bhandaru
d85ec0947c Remove marketing materials (#837)
Signed-off-by: Malini Bhandaru <malini.bhandaru@intel.com>
2024-09-19 09:27:01 +08:00
rbrugaro
dc94026d98 doc PR to main instead of of v1.0r (#838)
Signed-off-by: rbrugaro <rita.brugarolas.brufau@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 09:20:55 +08:00
Letong Han
1e130314d9 [Translation] Support manifests and nginx (#812)
Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: root <root@a4bf019305c5.jf.intel.com>
Co-authored-by: root <root@a4bf019305c5.jf.intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-19 07:08:13 +08:00
Ying Hu
b205dc7571 Update README.md for Multiplatforms (#834)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-18 23:25:05 +08:00
kevinintel
3b70fb0d42 Refine the quick start of ChatQnA (#828)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-18 22:23:22 +08:00
ZePan110
412a0b00c3 Fix other repo issue. (#829)
Signed-off-by: ZePan110 <ze.pan@intel.com>
2024-09-18 20:33:09 +08:00
kevinintel
96d5cd9127 Update supported_examples (#825)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-18 17:13:35 +08:00
ZePan110
0bb0abb0d3 Fix issue (#826)
Signed-off-by: ZePan110 <ze.pan@intel.com>
2024-09-18 16:17:58 +08:00
kevinintel
e0b3b579a3 [Doc] doc improvement (#811)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-18 15:21:28 +08:00
chen, suyue
e5affb93ab update V1.0 benchmark manifest (#822)
Co-authored-by: Zhenzhong1 <zhenzhong.xu@intel.com>
2024-09-18 10:36:33 +08:00
chen, suyue
e2a74f7463 update image name (#820)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-18 10:35:53 +08:00
Dina Suehiro Jones
79e947e44f Fix BACKEND_SERVICE_ENDPOINT variable value in the VideoQnA instructions (#821)
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
2024-09-18 10:33:50 +08:00
lvliang-intel
bceacdc804 Fix README issues (#817)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-18 09:50:17 +08:00
Louie Tsai
375ea7a90c Improve ChatQnA flowchat according to feedback (#736)
Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-09-16 18:29:13 -07:00
ZePan110
06117077b0 Add hyperlinks picture paths validation. (#800)
Signed-off-by: ZePan110 <ze.pan@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-14 18:25:01 +08:00
Tiep Le
b6cce35a93 Add MultimodalQnA as MMRAG usecase in Example (#751)
Signed-off-by: Tiep Le <tiep.le@intel.com>
Signed-off-by: siddhivelankar23 <siddhi.velankar@intel.com>
Signed-off-by: sjagtap1803 <siddhant.jagtap@intel.com>
2024-09-14 16:55:29 +08:00
Sihan Chen
06696c8e58 [ChatQnA] Add no_wrapper benchmarking and update legacy manifests (#767)
Co-authored-by: Zhenzhong1 <zhenzhong.xu@intel.com>
2024-09-14 16:17:15 +08:00
Dina Suehiro Jones
bc4bbfa849 Fix issues with the VisualQnA instructions (#809)
Signed-off-by: Dina Suehiro Jones <dina.s.jones@intel.com>
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-14 10:10:25 +08:00
XinyuYe-Intel
edcc50fe97 Added gaudi example for rerank model finetuning (#794)
Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
2024-09-14 09:42:23 +08:00
lvliang-intel
2d28bebac6 Update README with new examples (#808)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-14 09:41:51 +08:00
Jaswanth Karani
b84c98983d Made cogen react ui to use runtime environment variables (#807)
Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-14 09:27:14 +08:00
lkk
ba17031198 add tgi bf16 setup on CPU k8s. (#795)
Co-authored-by: root <root@idc708073.jf.intel.com>
Co-authored-by: Eero Tamminen <eero.t.tamminen@intel.com>
2024-09-13 19:55:57 +08:00
ZhaoqiongZ
f990f7966e update doc according to comments (#805)
Signed-off-by: Zheng, Zhaoqiong <zhaoqiong.zheng@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-13 19:55:33 +08:00
Ying Hu
87e51d5c36 Update README.md of pdf file (#804)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-13 17:14:34 +08:00
Malini Bhandaru
e1b8ce053b Fix Xeon reference per its trademark (#803)
Signed-off-by: Malini Bhandaru <malini.bhandaru@intel.com>
2024-09-12 21:08:55 -07:00
Malini Bhandaru
558ea3bb7f adopted tech writing style (#796)
Signed-off-by: Malini Bhandaru <malini.bhandaru@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-13 09:42:59 +08:00
Sihan Chen
4112fd0b69 Fix megaservice ulimit issue under high concurrency (#797) 2024-09-12 23:51:47 +08:00
Huiling Bao
e1022911b6 BUGFIX: rename videoragqna to videoqna to align with other examples (#798)
Signed-off-by: BaoHuiling <huiling.bao@intel.com>
Signed-off-by: chen, suyue <suyue.chen@intel.com>
2024-09-12 23:42:55 +08:00
chen, suyue
3f2e7b73ac add image build for new examples (#802)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-12 22:17:12 +08:00
XinyaoWa
264759d85a fix path bug for reorg (#801)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-09-12 17:52:06 +08:00
David Kinder
d42292967c doc: fix broken image reference and markdown (#789)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-12 09:09:39 +08:00
David Kinder
a3fa0d6469 doc: give document meaningful title (#790)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-12 09:09:04 +08:00
sri-intel
5ab27b63ff Change megaservice path in line with new file structure (#792)
Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
2024-09-12 09:07:35 +08:00
Chendi.Xue
62dbb6daee [DocIndexRetriever] Add xeon test and fix gaudi test (#788)
Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
2024-09-12 09:06:53 +08:00
minmin-intel
10fe3c6066 fix typo in test script in AgentQnA (#787)
Signed-off-by: minmin-intel <minmin.hou@intel.com>
2024-09-12 07:40:02 +08:00
minmin-intel
262a6f6055 Agent example for v1.0 release (#684)
Signed-off-by: minmin-intel <minmin.hou@intel.com>
Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
2024-09-12 00:05:34 +08:00
WenjiaoYue
e48532e750 Add imagePrompt to display default image hint (#777)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-11 23:22:45 +08:00
XinyuYe-Intel
be8e283f6b Fix InstructionTuning and RerankFinetuning tests (#785)
Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
2024-09-11 20:01:12 +08:00
Huiling Bao
7b2194f71c Update invalid link (#786)
Signed-off-by: BaoHuiling <huiling.bao@intel.com>
2024-09-11 20:00:44 +08:00
Huiling Bao
2dd69dcf73 Add VideoRAGQnA as MMRAG usecase in Example (#744)
Signed-off-by: BaoHuiling <huiling.bao@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: kevinintel <hanwen.chang@intel.com>
2024-09-11 17:18:19 +08:00
Chun Tao
1a934afb3a Add table to list port, endpoint, framework, model, serving, and hardware for each microservice in ChatQnA (#697)
Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
Signed-off-by: Chun Tao <chun.tao@intel.com>
Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Co-authored-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Letong Han <106566639+letonghan@users.noreply.github.com>
Co-authored-by: XinyuYe-Intel <xinyu.ye@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
Co-authored-by: Zhenzhong1 <109137058+Zhenzhong1@users.noreply.github.com>
Co-authored-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: Lianhao Lu <lianhao.lu@intel.com>
Co-authored-by: Ying Hu <ying.hu@intel.com>
2024-09-11 15:45:08 +08:00
xiguiw
5c67204734 Update SearchQnA document and compose.yaml (#774)
Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-11 15:39:07 +08:00
XinyaoWa
d2bab99835 refine readme for reorg (#782)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-11 14:57:29 +08:00
David Kinder
d97882ec8e doc: fix incorrect path to png image files (#783)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-11 13:22:44 +08:00
feng-intel
63406dc050 Yaml: add comments to specify gaudi device ids. (#753)
Signed-off-by: fengding <feng1.ding@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-11 12:02:18 +08:00
Lianhao Lu
ff6f841ec0 README: fix broken links (#781)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-09-11 09:41:01 +08:00
chen, suyue
88fde629ad fix image build issue on push (#780)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-11 09:26:55 +08:00
Lianhao Lu
1144fae248 AgentQnA: Fix erroneous link in the README (#775)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-09-11 08:15:11 +08:00
XinyaoWa
504228eea2 fix reorg bug (#779)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-09-11 00:00:18 +08:00
XinyaoWa
d73129cbf0 Refactor folder to support different vendors (#743)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-10 23:27:19 +08:00
Lianhao Lu
ba94e0130d Add ui/nginx support in K8S manifest for ChatQnA/CodeGen/CodeTrans/Docsum (#773)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-09-10 16:30:14 +08:00
Letong Han
aebc23f5ae [ChatQnA] Update README for ModelScope (#770)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-10 13:50:36 +08:00
Zhenzhong1
36fb9a987d [ChatQnA] Update benchmarking manifests (#766)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-10 11:07:48 +08:00
chen, suyue
0869029ef2 update image build for 2 new examples (#729)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
2024-09-10 09:26:05 +08:00
WenjiaoYue
fa12083e35 Integrate visualQnA backend (#768)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-09 16:55:13 +09:00
shaohef
a2745b22a7 Provide the method to get nke-10k-2023.pdf (#769)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-09 14:52:38 +08:00
lvliang-intel
def19b449e Enable nginx for VisualQnA (#754)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-09 10:35:57 +09:00
Sihan Chen
ebe6b473e9 Add megaservice definition without microservice wrappers (#700)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-06 18:49:28 +08:00
Lianhao Lu
0629696333 K8S manifest: Update ChatQnA/CodeGen/CodeTrans/DocSum
- Update ChatQnA/CodeGen/CodeTrans/DocSum k8s manifest
  to avoid requiring creating directory for cache model.

- Add chatqna-guardrails manifest files.

- Fix bug #752 introduced by PR #669

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-09-06 16:09:42 +08:00
kevinintel
4bd7841f17 Update README.md (#759)
* Update README.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-06 14:59:14 +08:00
Jaswanth Karani
1d1e1f90b6 Add Settings and Update system Prompt option (#746)
* Added settings and system prompt option

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
2024-09-06 13:37:45 +08:00
David Kinder
67394b88fa doc: fix headings and indenting (#748)
* doc: fix headings and indenting
* only one H1 header (for title) is allowed
* fix indenting under ordered lists

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-06 12:59:33 +08:00
chen, suyue
947936ed7b Update v0.9 RAG release data (#747)
* run both xeon and gaudi when both hardware detect

Signed-off-by: chensuyue <suyue.chen@intel.com>

* add v0.9 RAG release data

Signed-off-by: chensuyue <suyue.chen@intel.com>

* update system summary

Signed-off-by: chensuyue <suyue.chen@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-06 09:55:55 +08:00
Lianhao Lu
4b0bc263ab watch more docker compose files' changes (#677)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-09-05 22:44:53 +08:00
WenjiaoYue
758d236463 Add chatQnA UI manifest (#669)
* Add chatQnA UI manifest

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update port

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add nginx config

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update code

* update nginx config

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update nginx config

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update ui IP

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update yaml

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update api

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update env config

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update env

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update specify node

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update node-type

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update yaml

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* update yaml

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* delete nodeSelector

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update dataprep api

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* add node-type

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* delete specify nodeSelector

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* delete useless space

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-05 22:44:10 +08:00
Zhenzhong1
ac3486038c [ChatQnA] udate OOB & Tuned manifests (#738)
* update OOB manifests

* update tgi parameters

* update OOB manifests for w/o rerank

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update tgi parameters

* update tgi parameters for v0.9 w/o rerank

* update OOB manifests 2.0.4->2.0.1 for w/o rerank

* update tuned manifests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update tuned manifests

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-05 22:23:51 +08:00
chen, suyue
e0bc5f2a4d update logs from standard cd perf workflow (#733)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-05 14:58:24 +08:00
XinyuYe-Intel
71857f50c5 Add rerank finetuning example (#741)
* add rerank finetuning example.

Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-05 14:51:39 +08:00
Letong Han
6b617d6743 [ChatQnA] Update README for without Rerank Pipeline (#740)
* update readme for chatqna w/o rerank

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-05 14:49:12 +08:00
huiyan2021
43b2ae59a1 Fix readme for nv gpu (#727) 2024-09-05 08:33:07 +08:00
Zhenzhong1
6730b242cc [ChatQnA] Update retrieval & dataprep manifests (#717)
* modify tgi hyperparameters

* upgrade tgi 2.0.1 to 2.0.4

* Update dataprep-microservice_run.yaml

* Update retrieval-microservice_run.yaml

* Update retrieval-microservice_run.yaml

* Update dataprep-microservice_run.yaml

* Update dataprep-microservice_run.yaml

* Update dataprep-microservice_run.yaml

* Update retrieval-microservice_run.yaml

* Update retrieval-microservice_run.yaml
2024-09-04 19:50:46 +08:00
Letong Han
4a51874e4d update readme for w/o rerank (#731)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-04 15:01:30 +08:00
lvliang-intel
995a62c9d9 Add new test cases for VisualQnA (#712)
* Add new test cases for VisualQnA

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-09-04 13:21:50 +08:00
David Kinder
9cf1d88b6d doc: use markdown table in supported_examples (#707)
* doc: use markdown table in supported_examples

replace raw html with markdown table syntax to fix yucky github.io
rendering for raw html tables

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-04 00:48:31 +08:00
ZePan110
a8244c40ea Update docker images list. (#692)
* Update docker images list.

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove XXX-ui-react.

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Modify format.

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add some description

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add Description.

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: zepan <ze.pan@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-03 21:15:04 +08:00
Letong Han
55d287dfcf update readme to fix input length (#720)
Signed-off-by: letonghan <letong.han@intel.com>
2024-09-03 19:01:28 +08:00
Zhenzhong1
3563f5db6b [ChatQnA]Update manifests (#716)
* update manifests for v0.9
2024-09-03 15:24:54 +08:00
bjzhjing
8c40204eda react-ui: Add support to display Chinese (#713)
* react-ui: Add support to display Chinese

llm-tgi microservice from GenAIComps has encoded each text, so Chinese
response will be shown as hexadecimal in react UI. Add support to decode
and display the response in Chinese. Also return raw response if no
pattern found.

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Cathy Zhang <cathy.zhang@intel.com>
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-03 15:07:14 +08:00
Letong Han
afc3341156 Refine ChatQnA README for TGI (#715)
* update chatqna readme for tgi

Signed-off-by: letonghan <letong.han@intel.com>

* update log block

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
2024-09-03 15:06:50 +08:00
sri-intel
e5ec38c796 Update port in set_env.sh for TGI endpoint (#649) 2024-09-03 15:05:44 +08:00
XinyuYe-Intel
4c78f8cbbb Add instruction tuning example (#691)
* add instruction tuning example.

Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-03 15:04:59 +08:00
lvliang-intel
adb157f2e7 Update readme for manifests of some examples (#708)
* Update readme for manifests of some examples

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-09-03 15:00:41 +08:00
lvliang-intel
07baa8f922 Add default model for VisualQnA README (#709)
* Add default model for VisualQnA README

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-09-03 14:59:50 +08:00
kevinintel
7f897979c4 add more code owners (#711)
* add more code owners

* add owner

* remove comma

* add owner
2024-09-03 14:58:51 +08:00
chen, suyue
22d066a8d7 fix comps/nginx image build content (#714)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-09-03 11:58:49 +08:00
David Kinder
c6d811ab11 doc: remove invalid code block language (#705)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-09-03 10:10:56 +08:00
Sun, Xuehao
efa4a5aaa4 Add new third party dependency comment on PR (#275)
* add comment

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* remove test

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* Update message

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* update message

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* Add dependency review

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-01 22:09:00 +08:00
Louie Tsai
2ef83fc67b Update README.md and remove some open-source details (#682)
According to TCEs' feedback, don't need to have those open-source project details in the flowchart.

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-08-31 22:44:39 +08:00
Wang, Kai Lawrence
fbaa0243ee Modify CHAT_BASE_URL to BACKEND_BASE_URL (#701)
Signed-off-by: Wang, Kai Lawrence <kai.lawrence.wang@intel.com>
Co-authored-by: XuhuiRen <44249229+XuhuiRen@users.noreply.github.com>
2024-08-31 22:43:14 +08:00
chen, suyue
675ea4a383 docker image cd workflow enhance (#702)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-30 23:04:36 +08:00
Ying Chun Guo
2a6af6491a update mount path in xeon k8s (#696)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-30 15:09:00 +08:00
Steve Zhang
f5f1e323bb Revert the LLM model for kubernetes GMS (#675)
* revert the LLM model to meta-llama/CodeLlama-7b-hf
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-08-30 13:54:42 +08:00
XinyaoWa
d487093d10 Add default model in readme for FaqGen and DocSum (#693)
* update default model in readme for DocSum

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-08-30 12:40:36 +08:00
ZePan110
e6f5d13ecc Modify the handling of detected warnings to only prompt. (#688)
Signed-off-by: zepan <ze.pan@intel.com>
2024-08-30 11:58:57 +08:00
chen, suyue
dba908aa22 optimize image scan cd workflow (#699)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-30 11:32:46 +08:00
Yao Qing
814164dc4f [Codegen] Refine readme to prompt users on how to change the model. (#695)
* [Codegen] Refine readme to prompt users on how to change the model.

Signed-off-by: Yao, Qing <qing.yao@intel.com>

* [Codegen] Add section Required Model.

Signed-off-by: Yao, Qing <qing.yao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yao, Qing <qing.yao@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 22:17:03 +08:00
Letong Han
cc84847082 Add Nginx - docker in CodeTrans (#609)
* modify docker for nginx in CodeTrans

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* refine docker and test script

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 22:15:46 +08:00
Sihan Chen
f4f4da2dca add AudioQnA readme with supported model (#689)
* add readme with supported model

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add explaination

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 22:01:45 +08:00
Sun, Xuehao
1e47444559 fix token name (#690)
* fix token

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* fix

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-08-29 21:26:16 +08:00
Letong Han
2a2ff45e2b Explain Default Model in ChatQnA and CodeTrans READMEs (#694)
* explain default model in CodeTrans READMEs

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* explain default model in ChatQnA READMEs

Signed-off-by: letonghan <letong.han@intel.com>

* add required models

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 21:22:59 +08:00
Letong Han
6a679ba80f Add Nginx - k8s manifest in CodeTrans (#610)
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-29 17:32:30 +08:00
Neo Zhang Jianyu
84a781a1a3 Add issue template (#647)
* add issue template

* divide into bug/feature

* Update config.yml

* Update 1_bug_template.yml

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* rm customer info

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change to dropdown type

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-29 11:23:01 +08:00
WenjiaoYue
32afb6501c update env (#678)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-08-29 10:29:35 +08:00
Sun, Xuehao
035f39f0d9 weekly update images tag (#667)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-08-29 10:27:06 +08:00
Abolfazl Shahbazi
6f3e54a22a Always upload scan artifacts (#680)
Signed-off-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-08-29 09:35:47 +08:00
Abolfazl Shahbazi
1874dfd148 Remove 'vim' from all Dockerfiles (#663)
Signed-off-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
Co-authored-by: lvliang-intel <liang1.lv@intel.com>
2024-08-28 08:30:49 -07:00
David Kinder
7a0fca73e6 doc: fix headings (#656)
* doc: fix headings

* Fix incorrect uses of heading levels
* fix indenting within lists

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-28 20:45:18 +08:00
Ying Hu
beda609b4b Yinghu5 patch 1 (#676)
* Update set_env.sh

to fix #670

* Update README.md

fixed your_ip and host_ip

* Update README.md

fix your_ip and host_ip
2024-08-28 20:42:44 +08:00
jotpalch
993688ac91 fix: Resolve port conflict in llava-tgi-service (#665)
- Changed the external port of llava-tgi-service from 9399 to 8399
- This resolves the port conflict with the lvm-tgi service
- Internal port mapping remains unchanged (80)
2024-08-28 17:07:15 +08:00
chen, suyue
5fde666c43 enhance image publish action (#659)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-28 09:24:57 +08:00
Steve Zhang
4133757642 Change docs of kubernetes for curl commands in README (#661)
* change docs for curl commands in README.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* The Namespace 'CT' is invalid.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-08-27 19:36:37 +08:00
lvliang-intel
10c81f1c57 Update ollama run command (#668)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-27 14:54:53 +08:00
xiguiw
dad8eb4b82 [Doc] Update ChatQnA flow chart (#542)
* Update flow chart

Signed-off-by: Wang, Xigui <xigui.wang@intel.com>

* Updated Flowchart

Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>

---------

Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
Signed-off-by: srinarayan-srikanthan <srinarayan.srikanthan@intel.com>
Co-authored-by: Louie Tsai <louie.tsai@intel.com>
2024-08-26 12:20:21 -07:00
lvliang-intel
af21e94a29 Add benchmark README for ChatQnA (#662)
* Add benchmark README for ChatQnA

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add benchmark.yaml

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update yaml path

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* fix preci issue

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update title

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

---------

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-26 22:39:57 +08:00
chen, suyue
f78aa9ee2f add env for chatqna vllm (#655)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-23 22:10:10 +08:00
Dina Suehiro Jones
c25063f4bb Minor fixes for CodeGen Xeon and Gaudi Kubernetes codegen.yaml and doc updates (#613)
* Minor fixes for CodeGen Xeon and Gaudi Kubernetes codegen.yaml and doc updates

Signed-off-by: dmsuehir <dina.s.jones@intel.com>
2024-08-23 16:04:57 +08:00
chen, suyue
4f3be23efa fix translation gaudi env (#653)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-22 20:00:05 +08:00
Ying Hu
9657f7bc83 Update set_env.sh (#644) 2024-08-22 16:02:55 +08:00
Sihan Chen
ac324a9ec2 minor fix mismatched hf token (#651) 2024-08-22 15:11:31 +08:00
chen, suyue
dfaf47978d optimize CI log format (#648)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-22 15:08:59 +08:00
Sihan Chen
acbaaf8ff0 change searchqna prompt (#639)
* change prompt

* debug

* debug

---------

Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-08-22 11:53:42 +08:00
Kefei Zhang
06cb308611 change codegen tgi model (#646)
* change codegen tgi model

Signed-off-by: KfreeZ <kefei.zhang@intel.com>
2024-08-22 11:42:57 +08:00
Zhenzhong1
e6b4fff05c Update the number of microservice replicas for OPEA v0.9 (#645) 2024-08-22 09:48:47 +08:00
lvliang-intel
a54ffd2c1e Support ChatQnA pipeline without rerank microservice (#643)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-22 09:26:54 +08:00
Abolfazl Shahbazi
f3ffcd50b3 Adding Trivy and SBOM actions (#635)
Signed-off-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-08-21 23:17:35 +08:00
Hoong Tee, Yeoh
947cbe39b8 ProductivitySuite Combo Application with REACT UI and Keycloak Authentication (#592)
* Initial commit for Combo App

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Added README Updates

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Updated README and Test Script

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* added react UI

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* added echo statement

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* Updated README

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* fixed delete file issue in data prep

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* Updated Port

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* updated readme and test file

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated readme

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* Readme Update

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* README: Include Keycloak Configuration Setup Guide

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* Update keycloak_setup_guide relative link

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* Added README Updates

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* ProductivitySuite: Include kubernetes deployment yaml and README steps

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* removed unwanted line

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* Updates tests

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* updated readme

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated readme

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated readme

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* removed commented code

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* Update test script to adopt opea format

Update format for ProductivitySuite test script.

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix productivitySuite test

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* Fix ProductivitySuite test

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* Updated Test Scripts

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Updated Scripts

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Added new services to test file

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Added check for CodeGen TGI container

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Updated Model ID

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* ProductivitySuite: Update react keycloak realm and client

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* ProductivitySuite: Update keycloak_setup_guide

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Updated Ports

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

---------

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
Co-authored-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: jaswanth8888 <karani.jaswanth@gmail.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>
2024-08-21 23:04:29 +08:00
dolpher
fbb81b67db Update README for k8s deployment (#640)
Signed-off-by: Dolpher Du <dolpher.du@intel.com>
2024-08-21 22:56:53 +08:00
chen, suyue
5d39506c5c Add env params for chatqna xeon test (#642)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-21 22:53:32 +08:00
Chendi.Xue
566cf93c34 Add new DocIndexRetriever example (#405)
* Add DocIndexRetriever example

Signed-off-by: Chendi.Xue <chendi.xue@intel.com>


---------

Signed-off-by: Chendi.Xue <chendi.xue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: XuhuiRen <44249229+XuhuiRen@users.noreply.github.com>
2024-08-21 22:30:23 +08:00
Lianhao Lu
771975510a chatqna k8s manifest: Fixed retriever-redis v0.9 image issue (#638)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-08-21 22:24:29 +08:00
Sihan Chen
6674832162 fix tgi xeon tag (#641) 2024-08-21 22:17:07 +08:00
minmin-intel
67df2804de AgentQnA example (#601)
* initial code and readme for hierarchical agent example

* agent test with openai llm passed

* update readme and add test

* update test

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change example name and update docker yaml

Signed-off-by: minmin-intel <minmin.hou@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* change diagram name and test script name

Signed-off-by: minmin-intel <minmin.hou@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update test

---------

Signed-off-by: minmin-intel <minmin.hou@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-21 22:10:22 +08:00
Ying Chun Guo
46af6f3bc4 change namespace surfix to random string (#637)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-21 13:00:06 +08:00
Louie Tsai
343d614591 [Doc]Add a micro/mega service WorkFlow for DocSum (#537)
* Update README.md

added a micro/megaservice workflow for Doc Sum

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* Update README.md

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* fix format issue

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

---------

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-08-21 09:49:28 +08:00
lvliang-intel
87617e761c Clean deprecated VisualQnA code (#634)
* Clean deprecated VisualQnA code

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* update tgi repo

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

---------

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-20 22:21:18 +08:00
chen, suyue
db2d2bd1a1 fix chatqna guardrails (#615)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-20 22:15:23 +08:00
WenjiaoYue
4fa37e7842 update env for manifest (#624)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-08-20 22:13:11 +08:00
Ying Hu
c73e4e0f26 [doc] Update README.md (#633)
fix the sentence for more general hardware
2024-08-20 15:22:53 +08:00
Zhenzhong1
ba78b4c994 update manifests for v0.9 (#632)
* update model HF TOKEN variables & reranking name for v0.9
2024-08-20 14:35:14 +08:00
Lianhao Lu
01c1b7504f Update K8S manifest for ChatQnA/CodeGen/CodeTrans/DocSum
- Sync with docker-compose changes since v0.8 release

- Add K8S probes

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-08-20 10:45:15 +08:00
chen, suyue
c016d8264a update deploy_gmc logical in cd workflow (#627)
* update deploy_gmc logical

Signed-off-by: chensuyue <suyue.chen@intel.com>

* bug fix

Signed-off-by: chensuyue <suyue.chen@intel.com>

* add always() for run-examples

Signed-off-by: chensuyue <suyue.chen@intel.com>

* bug fix

Signed-off-by: chensuyue <suyue.chen@intel.com>

---------

Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-19 22:24:13 +08:00
Ying Chun Guo
4fd3517f23 update benchmark manifest to fix errors (#626)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-19 21:59:26 +08:00
Sun, Xuehao
503a1a9844 fix ghcr.io/huggingface/text-generation-inference tag (#622)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-19 20:27:29 +08:00
Zhenzhong1
08f57fa54a update manifests for v0.9 (#623)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-19 15:55:04 +08:00
Ying Hu
5a9c109e35 doc fix: Update README.md to remove specific dicscription of paragraph-1 (#621)
* Update README.md

According to #https://github.com/opea-project/GenAIExamples/issues/338: 

The motivation paragraph 2 is more general and perhaps should move up as paragraph-1. Original paragraph-1 gets too specific into legal documents prematurely.

so Remove the paragraph 1 as it is not related.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-19 11:44:41 +08:00
Sun, Xuehao
c327972776 chore: Add skopeo to manual freeze images workflow (#620)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-08-19 11:00:39 +08:00
Ying Chun Guo
f45e4c6956 Add GMC e2e in CD workflow (#619)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-19 10:27:10 +08:00
chen, suyue
5dcadf3d3f Fix CI test changed file detect issue (#618)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-18 19:31:13 +08:00
chen, suyue
3363a37197 update workflow name (#617)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-18 17:46:09 +08:00
lvliang-intel
b2771ad3f2 Using TGI official release docker image for intel cpu (#581)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-18 17:17:44 +08:00
David Kinder
e81e0e557c doc: remove use of HTML for table in README (#596)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-08-17 22:44:45 +08:00
Ying Chun Guo
71363a6b9d change microservice tags in CD workflow (#612)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-16 21:57:28 +08:00
Ying Chun Guo
a39f23a16e Add gmc build, scan and deploy workflow (#611)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-16 20:55:01 +08:00
Sun, Xuehao
c9f9acab61 Freeze base images (#607)
* Update Dockerfile to use LANGCHAIN_VERSION argument

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* Revert "Update Dockerfile to use LANGCHAIN_VERSION argument"

This reverts commit 1bff239d38.

* chore: Add manual freeze images workflow

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* split jobs

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-16 20:18:44 +08:00
Letong Han
040d2b7fd9 update port for dataprep in set_env.sh (#606)
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-16 18:15:33 +08:00
chen, suyue
6296e9f2fb remove continue-on-error: true to stop the test when image build failed (#608)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-16 17:29:59 +08:00
Steve Zhang
c86cf8536d Add AudioQnA example via GMC (#597)
* add AudioQnA example via GMC.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* add more information for e2e test scritpts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

* fix bug in e2e test scripts.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-08-16 14:25:50 +08:00
chen, suyue
039014fbbf Fix CD workflow typos (#605)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-16 09:26:54 +08:00
chen, suyue
1c07a38457 set action back to pull_request_target (#602)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-16 00:31:01 +08:00
chen, suyue
e93146b33e Add BoM collect workflow and image publish workflow (#600)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-16 00:22:40 +08:00
chen, suyue
a6385bc6fd Fix left issues in CI/CD structure refactor (#599)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-16 00:22:24 +08:00
chen, suyue
c26d0f62b8 Enhance CI/CD infrastructure (#593)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-08-15 22:39:21 +08:00
Letong Han
e71aba0080 Fix ChatQnA Qdrant CI issues (#569)
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-14 22:31:27 +08:00
XinyaoWa
cfcac3f0ec Fix vLLM and vLLM-on-Ray UT bug (#580)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-08-14 18:03:25 +08:00
Ying Chun Guo
d68be058f5 add composible manifest e2e for cd workflow (#588)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-14 15:53:49 +08:00
Jaswanth Karani
45cf553d36 fixed ISSUE-528 (#590)
* fixed ISSUE-528

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-14 14:47:20 +08:00
Steve Zhang
1c23d87aa2 Add dataprep microservice to chatQnA example and the e2e test (#589)
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-08-14 14:39:46 +08:00
chen, suyue
64bfea9054 fix corner issue in CI test (#585)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-13 17:51:08 +08:00
Sihan Chen
0a6bad0ab9 add k8s support for audioqna (#583)
* add k8s support for audioqna

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-13 17:38:18 +08:00
lvliang-intel
4f7fc39d66 Add kubernetes support for VisualQnA (#578)
* Add kubernetes support for VisualQnA

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* update gmc file

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* update pic

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

---------

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-13 17:14:03 +08:00
XinyaoWa
80e3e2a2d3 Update mainifest for FaqGen (#582)
* update tgi version

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add k8s for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add benchmark for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* refine k8s for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add tuning for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add prompts with different length for faq

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add tgi docker for llama3.1

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove useless code

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove nodeselector

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* remove hg token

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* refine code structure

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix readme

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

---------

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-13 16:29:15 +08:00
chen, suyue
8c384e0314 Build up docker images CD workflow (#576)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-13 15:20:34 +08:00
chen, suyue
3c9e2aaffd add secrets for test (#579)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-13 09:43:46 +08:00
Neo Zhang Jianyu
acdd712929 fix script issues in MD file (#538) 2024-08-13 09:20:30 +08:00
xiguiw
c297155bea Pass OLLAMA_MODEL env to docker container (#571)
Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
2024-08-12 16:42:50 +08:00
WenjiaoYue
923cf69e63 Add VisualQnA UI (#572)
* update VisualQnA front_end

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update ViualQnA into the ui folder

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* Add dockerFile

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-12 15:01:49 +08:00
jotpalch
7a67298f19 chore: add support for .md file in file upload (#555)
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-08-12 14:24:16 +08:00
Dina Suehiro Jones
a5ed2233b5 Fix minor issue in ChatQnA Gaudi docker README (#567)
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
2024-08-12 12:58:42 +08:00
chen, suyue
e12baca3b8 Fix typo in CI workflow (#570)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-12 11:26:32 +08:00
chen, suyue
939502dba1 support multiple test cases for ChatQnA (#553)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-12 00:26:01 +08:00
Ying Chun Guo
a072441c06 improve manifest chaqna test (#565)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-11 00:26:32 +08:00
Veenadhari Bedida
ed483719a8 Update ChatQnA readme with OpenShift instructions (#527)
* Update ChatQnA readme with OpenShift instructions

Signed-off-by: vbedida79 <veenadhari.bedida@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: vbedida79 <veenadhari.bedida@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-09 15:13:12 +05:30
ZePan110
14621f8492 Convert HTML to markdown format. (#564)
* Convert HTML to markdown format.

Signed-off-by: zepan <ze.pan@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: zepan <ze.pan@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-09 16:18:28 +08:00
lvliang-intel
2390920b1d Add VisualQnA docker for both Gaudi and Xeon using TGI serving (#547)
* Add VisualQnA docker for both Gaudi and Xeon

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update token length

Signed-off-by: lvliang-intel <liang1.lv@intel.com>

---------

Signed-off-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-09 09:45:17 +08:00
lkk
02a15366bc update chatqna dataprep-redis port (#557)
Co-authored-by: sdp <sdp@srf797636.jf.intel.com>
2024-08-08 22:23:32 +08:00
WenjiaoYue
f08d4115db Modify the language variable to match language highlight. (#543)
* Modify the variable name to match the language

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* Modify the variable name to match the language

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-08 14:27:57 +08:00
chen, suyue
5ac77f78da fix faqgen on xeon test scripts (#552)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-08-08 13:39:38 +08:00
Ying Chun Guo
ebc165a6aa Rename github workflows (#554)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-08 10:29:04 +08:00
nithi-i
ad8ca8886e Fix typo {your_ip} to {host_ip} (#533)
Co-authored-by: Pratool Bharti <pratool.bharti@intel.com>
2024-08-08 10:11:48 +08:00
Letong Han
88eeb0d7e6 Remove LangSmith from Examples (#545)
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-08 09:14:38 +08:00
Ying Chun Guo
e22d41362d Refactor build image workflows with common action.yml (#525)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-07 15:57:29 +08:00
Dina Suehiro Jones
17b9676a3d CodeGen README updates (#534)
Signed-off-by: dmsuehir <dina.s.jones@intel.com>
2024-08-06 22:30:39 -07:00
ZePan110
7dd9952f5e Remove deprecated folder. (#536)
Signed-off-by: zepan <ze.pan@intel.com>
2024-08-07 10:26:23 +08:00
lvliang-intel
06c4484b88 Update guardrail dokcer file path (#531)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-08-06 17:34:52 +08:00
Letong Han
3913c7bb36 Refine docker_compose for dataprep param settings (#486)
* add TEI_ENDPOINT for dataprep

Signed-off-by: letonghan <letong.han@intel.com>

* add TEI_ENDPOINT for dataprep

Signed-off-by: letonghan <letong.han@intel.com>

* update ui test file

Signed-off-by: letonghan <letong.han@intel.com>

* add dataprep test into script

Signed-off-by: letonghan <letong.han@intel.com>

* refine e2e test of chatqna

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix missing dockerfile path

Signed-off-by: letonghan <letong.han@intel.com>

* check test issue

Signed-off-by: letonghan <letong.han@intel.com>

* check dataprep log

Signed-off-by: letonghan <letong.han@intel.com>

* reverse codetrans

Signed-off-by: letonghan <letong.han@intel.com>

* cd log path

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add hf token in compose yaml

Signed-off-by: letonghan <letong.han@intel.com>

* add redis_host

Signed-off-by: letonghan <letong.han@intel.com>

* add upload link test

Signed-off-by: letonghan <letong.han@intel.com>

* re-format validate dataprep

Signed-off-by: letonghan <letong.han@intel.com>

* fix typo

Signed-off-by: letonghan <letong.han@intel.com>

* fix frontend env name

Signed-off-by: letonghan <letong.han@intel.com>

* fix ci issue

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-06 11:57:01 +08:00
Letong Han
abc02e1332 fix readme typo (#524)
Signed-off-by: letonghan <letong.han@intel.com>
2024-08-05 15:32:26 +08:00
ZePan110
cf021ee009 Check url of docker image list. (#472)
Signed-off-by: zepan <ze.pan@intel.com>
2024-08-05 14:01:47 +08:00
Louie Tsai
70a50d8b78 Update README.md to notify two gaudi cards needed (#293)
Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-08-05 14:01:29 +08:00
Sun, Xuehao
ab9879508f add code review owner (#501)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-08-05 13:34:17 +08:00
Letong Han
08eb2699b7 Refine Main README (#502)
* udpate examples readme

Signed-off-by: letonghan <letong.han@intel.com>

* update architecture img

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update img name

Signed-off-by: letonghan <letong.han@intel.com>

* udpate readme & fix dockerfile issue

Signed-off-by: letonghan <letong.han@intel.com>

* add k8s doc links

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-05 09:47:15 +08:00
David Kinder
4259240407 doc: missed an H1 in the middle of a doc (#498)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-08-05 07:45:04 +08:00
Ying Chun Guo
8bdb598417 automatic create issue to GenAIInfra when docker compose files are changed (#504)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-08-02 11:03:48 +08:00
ZePan110
ac89855ff8 Fix code scan warning (#473)
Signed-off-by: zepan <ze.pan@intel.com>
2024-08-02 09:31:30 +08:00
XinyaoWa
c71bc68c9c remove ray serve (#516)
Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
2024-08-02 09:28:36 +08:00
WenjiaoYue
09a3196324 Added the ChatQnA delete feature, and updated the corresponding README (#471)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-07-31 09:33:09 +08:00
David Kinder
015a2b178b doc: fix markdown (#474)
* fix multiple H1 headings
* remove unnecessary use of HTML
* fix missing indents on ordered list content

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:24:30 +08:00
David Kinder
33f83293d6 doc: fix CodeGen/README.md markdown (#475)
* fix multiple H1 headings
* edit use of please
* remove use of unnecessary HTML tags

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:24:12 +08:00
David Kinder
076bca3bbf doc: fix markdown in CodeTrans/README.md (#476)
* fix multiple H1 headings
* indent content of ordered list
* edit use of please
* edit unnecessary use of HTML

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:23:55 +08:00
David Kinder
83712b9f1b doc: fix markdown in DocSum/README.md (#477)
* fix multiple H1 headings
* indent content in ordered lists
* remove use of please
* edit use of unnecessary HTML

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:23:35 +08:00
David Kinder
704ec9234d doc: fix FaqGen/README.md markdown (#478)
* fix multiple H1 headings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:23:09 +08:00
David Kinder
c461b6081f doc: fix markdown in SearchQnA/README.md (#479)
* fix multiple H1 headings
* indent content in ordered list element
* remove use of please

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:22:43 +08:00
David Kinder
d645305816 doc: fix markdown in Translation/README.md (#480)
* fix multiple H1 headings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Abolfazl Shahbazi <abolfazl.shahbazi@intel.com>
2024-07-31 09:22:01 +08:00
David Kinder
9277fe6201 doc: fix markdown in docker_image_list.md (#481)
* fix multiple H1 headings

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-07-31 09:21:05 +08:00
David Kinder
21fab71f6d doc: fix headings in markdown files (#470)
First (and only) H1 heading is the title and subsequent headings should
not skip levels (e.g., from H2 to H4).

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-07-30 08:55:30 -07:00
chen, suyue
a2437e83e7 update compose.yaml fix the test issue (#467)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-28 23:36:39 +08:00
lvliang-intel
1b3398902b Add Grafana dashboard support (#466)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-07-26 20:43:58 +08:00
David Kinder
07921a98d0 doc: fix headings and broken image reference (#464)
* First (and only) H1 heading should be the document title
* image reference was broken

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-07-26 20:27:00 +08:00
David Kinder
42104fe117 doc: fix broken image references (#463)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-07-26 20:26:45 +08:00
David Kinder
1ac696bfa9 doc: fix broken images (#461)
path to images is a bit off

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2024-07-26 20:26:29 +08:00
Sihan Chen
8032ce60f6 add guardrails after LLM in ChatQnA (#456)
* add guardrails out

* change name

* add env
2024-07-26 20:13:46 +08:00
Zhenzhong1
b61c2abd61 upload manifests (#454)
* uploadded manifests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-26 20:12:54 +08:00
chen, suyue
965c13c556 rename docker compose.yaml (#446)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-26 20:03:36 +08:00
huiyan2021
8f9bcd4b3c Update image reference url in readme (#465) 2024-07-26 17:34:48 +08:00
ZePan110
6b5489a36e Add released docker_images_list.md (#432)
Signed-off-by: zepan <ze.pan@intel.com>
2024-07-26 16:42:39 +08:00
David Kinder
8d0c8fb949 doc: fix missing title H1 heading (#458)
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Co-authored-by: Haihao Shen <haihao.shen@intel.com>
2024-07-26 09:32:54 +08:00
dependabot[bot]
535dcc36e5 Bump torch from 2.1.0 to 2.2.0 in /AudioQnA/deprecated/docker/asr (#459)
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:28:54 +08:00
Jaswanth Karani
edf0d14c95 added doc sum react-ui (#418)
Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
2024-07-25 12:12:36 +08:00
Letong Han
43bd8f2e4b Refine Example READMEs (#457)
* refine retrieval part in readmes

Signed-off-by: letonghan <letong.han@intel.com>

* unify command

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
2024-07-25 11:36:47 +08:00
Steve Zhang
d0b028d199 Add new example of Translation for GenAIExample (#455)
* Add Translation GMC pipeline
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-07-25 09:26:41 +08:00
lvliang-intel
8b60948c7b Add auto truncate for embedding and rerank (#449)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-07-25 09:21:06 +08:00
WenjiaoYue
268d58d4a9 SearchQnA UT (#421)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-07-25 09:18:37 +08:00
WenjiaoYue
5984848bb0 update ChatQnA upload feature (#419)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-07-25 09:16:40 +08:00
lvliang-intel
f4b4ac0d3a Update TEI version v1.5 for better performance (#447)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-07-25 08:54:34 +08:00
gadmarkovits
c745641ba1 Added ChatQnA example using Qdrant retriever (#384)
* Added ChatQnA example using Qdrant retriever

Signed-off-by: gadmarkovits <gad.markovits@intel.com>

* Updated dockerfile path

Signed-off-by: gadmarkovits <gad.markovits@intel.com>

---------

Signed-off-by: gadmarkovits <gad.markovits@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-07-25 08:18:06 +08:00
Jaswanth Karani
1b48e54a3d code-gen-react-ui (#417)
* CodeGen: Manifest to deploy CodeGen with ReactUI into Kubernetes

Include manifest to deploy CodeGen pipeline with ReactUI into
Kubernetes. Include as well README file for the steps.

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>

* code-gen-react-ui

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* made changes as per PR suggestions

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* updated readme

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update base image

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated codegn dockerfile react

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated wait time

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* updated as per PR comments

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* aded react ui in gaudi test file

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* fixed PR comments

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* added docker pull for text-generation-model

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

* removed unused files

Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>

---------

Signed-off-by: Yeoh, Hoong Tee <hoong.tee.yeoh@intel.com>
Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
Co-authored-by: Yeoh, Hoong Tee <hoong.tee.yeoh@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>
2024-07-24 09:01:16 -07:00
Yogesh Pandey
8c4a2534c1 FAQGen Megaservice (#425)
* Added FAQGEN v1

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

---------

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-24 23:37:20 +08:00
Steve Zhang
21b7d11098 Add new example of SearchQnA for GenAIExample (#448)
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-07-24 15:59:52 +08:00
WenjiaoYue
e371b1e9d4 Update REAME to be consistent with .env variables (#452)
* Update REAME to be consistent with .env variables

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-24 15:34:11 +08:00
zehao-intel
95c13d9558 Fix Typo for Translation Example (#451)
Signed-off-by: zehao-intel <zehao.huang@intel.com>
2024-07-24 13:31:12 +08:00
Ying Chun Guo
62ae64f13c add checkout ref in gmc e2e workflow (#450)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-07-24 13:30:07 +08:00
XinyaoWa
631d841119 Support vLLM/vLLM-on-Ray/Ray Serve for ChatQnA (#428)
* support vllm for chatqna

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add vllm-on-ray into ChatQnA

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* support ray serve in ChatQnA

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* fix conflice

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* refine readme

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add UT for chatqna vllm

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add UT for ChatQnA Ray Serve

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* add UT for chatqna vllm ray

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add vllm for chatqna on xeon

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* fix bug for vllm chatqna cpu

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add ut for chatqna vllm

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>

---------

Signed-off-by: Xinyao Wang <xinyao.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-24 10:44:07 +08:00
Lianhao Lu
665c46ffae Update Kubernetes manifest files for deploying ChatQnA (#445)
Update Kubernetes manifest files for deploying ChatQnA without
GMC.

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-07-24 09:59:38 +08:00
Lianhao Lu
6e797fae89 README for installing 4 worklods using helm chart (#431)
Add README to install the following workloads using helm chart:

- ChatQnA
- CodeGen
- CodeTrans
- DocSum

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-07-24 09:46:03 +08:00
yang yuhan
b46ae8bdcc Fix a minor bug for chatqna in docker-compose (#442) (#443)
Embedding and reranking services failed to run on GPU H100.
Change the image tag and use CPU for these services. This PR will
fix #442

Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
2024-07-24 08:41:47 +08:00
Ying Chun Guo
f45f508847 allow gmc e2e workflow to get secrets (#444)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-07-23 21:34:36 +08:00
WenjiaoYue
284d855bf4 Translate UT for UI (#423)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-07-23 17:14:33 +08:00
Steve Zhang
290a74fae9 Update all examples yaml files of GMC in GenAIExample (#436)
* Update all examples yaml files of GMC in GenAIExample.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-07-23 16:40:51 +08:00
Letong Han
8ad7f36fe2 Update READMEs (#430)
* update readme gaudi part & add tei-gaudi params

Signed-off-by: letonghan <letong.han@intel.com>

* modify supported habana driver version

Signed-off-by: letonghan <letong.han@intel.com>

* update env set part

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add example for no_proxy

Signed-off-by: letonghan <letong.han@intel.com>

* add an example of public ip

Signed-off-by: letonghan <letong.han@intel.com>

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-23 15:25:02 +08:00
Lianhao Lu
2f9397e012 Update Kubernetes manifest files for CodeGen (#441)
Updated Kubernetes manifest files for CodeGen to reflect latest changes:
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-07-23 14:07:42 +08:00
Lianhao Lu
c9548d7921 Add Kubernetes manifest files for deploying CodeTrans (#435)
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-07-23 13:29:59 +08:00
Lianhao Lu
83146320aa Add Kubernetes manifest files for deploying DocSum (#434)
* Add Kubernetes manifest files for deploying DocSum

Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
2024-07-23 13:29:32 +08:00
chen, suyue
ecf3338835 refactor searchqna ci test (#437)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-23 10:17:41 +08:00
chen, suyue
b7975e79d8 refactor translation ci test (#438)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-23 10:17:24 +08:00
chen, suyue
bb42307af9 add docker compose yaml print for test (#433)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-22 15:36:03 +08:00
chen, suyue
2e312f44ed update pr template (#422)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-18 21:34:03 +08:00
chen, suyue
ee0dcb3d37 expand tgi connect timeout (#424)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-18 21:28:48 +08:00
Letong Han
f732674b1e Refine README of Examples (#420)
* update chatqna readme and set env script

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update for comments

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add consume

Signed-off-by: letonghan <letong.han@intel.com>

* modify details

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update codegen readme

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* add patch modifications

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update codegen readme

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update ui options

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* udpate codetrans readme

Signed-off-by: letonghan <letong.han@intel.com>

* update docsum & searchqna readme

Signed-off-by: letonghan <letong.han@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: letonghan <letong.han@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-18 21:17:09 +08:00
Ruoyu Ying
d9946180a2 doc: fix minor issue in GMC doc (#383)
Signed-off-by: Ruoyu Ying <ruoyu.ying@intel.com>
2024-07-18 16:21:28 +08:00
ZePan110
11a56e09ef Adding Chatqna Benchmark Test (#404)
Signed-off-by: zepan <ze.pan@intel.com>
2024-07-18 16:03:29 +08:00
chen, suyue
615f0d2547 update audioqna image name (#408)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-17 23:07:08 +08:00
lvliang-intel
9551594164 Add guardrails in the ChatQnA pipeline (#407)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-07-17 21:09:54 +08:00
xiguiw
97da49f61e [Doc]Add ChatQnA Flow Chart (#398)
Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
2024-07-16 21:05:56 +08:00
Sihan Chen
8d4209a015 add auto-truncate to gaudi tei (#388)
* fix sqna gaudi

* rootcause

* rootcause

---------

Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-07-15 17:13:59 +08:00
Sihan Chen
ba65415b78 Fix win PC issues (#399)
* change to LF

* add readme for windows pc

* add OLLAMA_MODEL param

* readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update README.md

* Update docker_compose.yaml

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-15 17:11:49 +08:00
chen, suyue
3505bd25a4 update tgi-gaudi version (#389)
Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: Spycsh <sihan.chen@intel.com>
2024-07-12 15:01:03 +08:00
WenjiaoYue
49789595e5 update visualQnA chinese version (#354)
* update visualQnA chinese version

Signed-off-by: WenjiaoYue <wenjiao.yue@intel.com>


---------

Signed-off-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-10 23:43:05 +08:00
Sihan Chen
ff05573d98 fix readme (#387) 2024-07-10 10:40:53 +08:00
Malini Bhandaru
c37d9c82b0 Updated READMEs for kubernetes example pipelines (#353)
* Updated READMEs for kubernetes.
Signed-off-by: mkbhanda <malini.bhandaru@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Kubernetes related Readme.
Signed-off-by: mkbhanda <malini.bhandaru@intel.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-10 09:03:08 +08:00
Yogesh Pandey
89ddec9b2d Updates for running ChatQnA + Conversational UI on Gaudi (#357)
* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added README and docker-compose updates for running chat Conversation on Gaudi

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* Updated tests

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* updates README and compose file as per review comments

Signed-off-by: Yogesh Pandey <yogesh.pandey@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yogesh Pandey <yogesh.pandey@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>
2024-07-10 09:01:59 +08:00
lvliang-intel
d7a5b751d9 Update reranking microservice dockerfile path (#381)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-07-10 09:01:26 +08:00
Ying Chun Guo
15fc6f9711 Optimize gmc manifest e2e tests (#382)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-07-09 14:46:58 +08:00
xiguiw
e878dc1311 [Doc] Add valid micro-service details (#194)
* [Doc] Add valid micro-service details

Signed-off-by: Wang, Xigui <xigui.wang@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Wang, Xigui <xigui.wang@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-09 09:45:49 +08:00
ctao456
377dd2fa9e [CodeGen] Add codegen flowchart (#369)
* Add codegen flowchart

Signed-off-by: Chun Tao <chun.tao@intel.com>

* update flowchart to markdown format

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update markdown diagram

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* delete last line

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add flowchart for CodeGen, update readme

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* udpates

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chun Tao <chun.tao@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-08 14:47:03 +08:00
Letong Han
335362ab11 Udpate ChatQnA docker compose for Dataprep Update (#336)
* udpate chatqna readme & docker compose for dataprep update

Signed-off-by: letonghan <letong.han@intel.com>
2024-07-08 13:14:36 +08:00
Arun Gupta
f9312b3713 Update README.md (#367)
Updating instructions after the fix of https://github.com/opea-project/GenAIExamples/pull/356

Signed-off-by: Arun Gupta Intel <arungupt@gbenedet-mobl3.amr.corp.intel.com>
2024-07-08 09:27:12 +08:00
chen, suyue
5f52a10ffe update tgi version (#378)
* try with tgi-gaudi:2.0.0

Signed-off-by: chensuyue <suyue.chen@intel.com>

* try with text-generation-inference:2.1.0

Signed-off-by: chensuyue <suyue.chen@intel.com>

* add params for tgi-gaudi:2.0.0

Signed-off-by: chensuyue <suyue.chen@intel.com>

---------

Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-08 09:05:27 +08:00
Steve Zhang
450efcc139 enhancement the codetrans e2e test. (#380)
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-07-05 17:26:20 +08:00
WenjiaoYue
034541404e Adapt Vllm response format (#379)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-07-05 13:46:41 +08:00
Sihan Chen
26d4ff11ff add ChatQnA instructions for AIPC (#356)
* Add readme for ChatQnA on AIPC

---------

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>
2024-07-02 16:01:47 +08:00
pre-commit-ci[bot]
3bb2fee922 [pre-commit.ci] pre-commit autoupdate (#364)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-02 13:13:25 +08:00
chen, suyue
7ebe781ccb frontend failed with unknown timeout issue (#365)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-07-02 10:42:21 +08:00
Ying Chun Guo
bbbaefacad enable image build on Gaudi when push event (#355)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-07-01 15:47:13 +08:00
chen, suyue
77ba9139a1 expand chatqna gaudi waiting time (#351)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-06-28 23:02:06 +08:00
Sihan Chen
1b307832d7 Add key TEI and TGI parameters for handling long retrievals (#340) 2024-06-28 21:06:22 +08:00
Steve Zhang
2e62ecc18a add docsum example e2e test for GMC. (#347)
* add docsum example e2e test for GMC.

Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* fix curl error for docsum.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* change the manifest e2e yaml.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* change the image format.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* fixing image mapping error.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* change the gmc e2e test.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* accelarate the e2e test.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* change the gmc e2e configuration.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* retrigger.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Malini Bhandaru <malini.bhandaru@intel.com>
2024-06-28 03:15:51 -07:00
chen, suyue
84a91bb990 solution for the conda-forge not available issue (#341)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-06-28 17:55:11 +08:00
Malini Bhandaru
7dd0506e08 chatqna kubernetes readme. (#335)
* chatqna kubernetes readme.
Signed-off-by: mkbhanda <malini.bhandaru@intel.com>
2024-06-28 17:29:59 +08:00
Sihan Chen
ca6a8f8e1d Fix minor codescan issue (#333) 2024-06-28 13:40:06 +08:00
Steve Zhang
295b81823c Add codetrans example test for genaiexample (#339)
* add codetrans example for genaiexample.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-06-28 11:59:20 +08:00
Steve Zhang
960cf38d33 Add codegen e2e test of genaiexample (#337)
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
2024-06-28 10:42:00 +08:00
Steve Zhang
afcb3a3523 Add e2e test of chatqna for genai example (#334)
* add e2e test of chatqna for genai example.
Signed-off-by: zhlsunshine <huailong.zhang@intel.com>
Co-authored-by: mkbhanda <malini.bhandaru@intel.com>
Co-authored-by: daisy-ycguo <yingchun.guo@intel.com>
2024-06-27 19:05:59 +08:00
WenjiaoYue
3ffe19eba1 Modify the corresponding format according to the backend new structure. (#326)
* Modify the corresponding format according to the backend new structure.

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update +page.svelte

* Update +page.svelte

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* update validate string

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* Update test_searchqna_on_gaudi.sh

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
2024-06-27 14:44:37 +08:00
Liangyx2
6f5a9932f7 add LlamaIndex in readme (#331)
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com>
2024-06-27 14:31:12 +08:00
WenjiaoYue
83e6a23441 update chinese response format (#332)
* ChatQnA chinese version

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* format chinese response

* update chinese format response

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-27 10:24:09 +08:00
huiyan2021
7f19e8b546 Fix #261 issue (#325)
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-06-26 23:49:42 +08:00
Liangyx2
81ceb26c3f add LlamaIndex for readme (#324)
Signed-off-by: Liangyx2 <yuxiang.liang@intel.com>
2024-06-26 20:49:40 +08:00
WenjiaoYue
2f472315fd Adapt Chinese characters (#327)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
2024-06-26 15:15:11 +08:00
Ronald Petty
6a3e9dbc18 Update README.md (#307)
typo fix in link name
2024-06-26 00:03:57 +08:00
Sihan Chen
6b76a93eb7 Add SearchQnA with GenAIComps (#306)
* searchqna structure

* add searchqna

Signed-off-by: Spycsh <sihan.chen@intel.com>

* fix readme

* fix readme

* revert forked repo info

* remove yaml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* draft tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix

* rm old yml

* fix

* check result

* debug

* revert

* rem wait time

---------

Signed-off-by: Spycsh <sihan.chen@intel.com>
Co-authored-by: letonghan <letong.han@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>
2024-06-25 23:43:34 +08:00
Sihan Chen
b4d8e1a19b Add AudioQnA with GenAIComps (#311)
* add AudioQnA comps

* readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* revert to main br

* draft tests

Signed-off-by: Spycsh <sihan.chen@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix

* fix

* rm old yml

* fix name

* fix

* remove

* longer warmup time

* Modify the corresponding format according to the backend new structure.

Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>

* Update .env

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Spycsh <sihan.chen@intel.com>
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
2024-06-25 23:37:57 +08:00
Jaswanth Karani
b994bc8731 Chat QNA React UI with conversation history (#314)
Signed-off-by: jaswanth8888 <karani.jaswanth@gmail.com>
2024-06-25 23:22:46 +08:00
chen, suyue
d9b62a5a62 add env for searchqna (#318)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-06-25 13:57:41 +08:00
zehao-intel
409c72350e Refactor Translation Example (#287)
* Refactor Translation Example

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* support e2s test

Signed-off-by: zehao-intel <zehao.huang@intel.com>

Signed-off-by: zehao-intel <zehao.huang@intel.com>

Signed-off-by: zehao-intel <zehao.huang@intel.com>

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* fix test ip_address

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* update test scripts

Signed-off-by: chensuyue <suyue.chen@intel.com>

* update test scripts

Signed-off-by: chensuyue <suyue.chen@intel.com>

* for test

Signed-off-by: chensuyue <suyue.chen@intel.com>

* fix readme and dockerfile

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* revert test code

Signed-off-by: chensuyue <suyue.chen@intel.com>

* remove gaudi test update

Signed-off-by: chensuyue <suyue.chen@intel.com>

* bug fix

Signed-off-by: chensuyue <suyue.chen@intel.com>

* fix test xeon

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* modify mega check

Signed-off-by: zehao-intel <zehao.huang@intel.com>

Signed-off-by: zehao-intel <zehao.huang@intel.com>

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* fix ui

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* fix ut network

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* fix network

Signed-off-by: zehao-intel <zehao.huang@intel.com>

* Modify the corresponding format according to the backend new structure. (#317)

* Add image build job in docker compose e2e gaudi test in CI (#305)

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>

* Add gpu support for ChatQnA (#308)

* add gpu support for chatqna

Signed-off-by: Ding, Ke <ke.ding@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Ding, Ke <ke.ding@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Update ChatQnA for Xeon docker_compose.yaml to fix downloads failing (#310)

* Update docker_compose

* Updated docker_compose

* Updated docker_compose

* Add build docker image option for test scripts (#312)

Signed-off-by: chensuyue <suyue.chen@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: Ding, Ke <ke.ding@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: Ying Chun Guo <yingchun.guo@intel.com>
Co-authored-by: Ke Ding <ke.ding@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steve Fowler <william.fowler@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>

---------

Signed-off-by: zehao-intel <zehao.huang@intel.com>
Signed-off-by: chensuyue <suyue.chen@intel.com>
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
Signed-off-by: Ding, Ke <ke.ding@intel.com>
Signed-off-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: chen, suyue <suyue.chen@intel.com>
Co-authored-by: WenjiaoYue <wenjiao.yue@intel.com>
Co-authored-by: Ying Chun Guo <yingchun.guo@intel.com>
Co-authored-by: Ke Ding <ke.ding@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Steve Fowler <william.fowler@intel.com>
Co-authored-by: lvliang-intel <liang1.lv@intel.com>
2024-06-25 13:22:27 +08:00
chen, suyue
e32a51451c Add build docker image option for test scripts (#312)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-06-24 23:33:46 +08:00
Steve Fowler
e948a7f81b Update ChatQnA for Xeon docker_compose.yaml to fix downloads failing (#310)
* Update docker_compose

* Updated docker_compose

* Updated docker_compose
2024-06-24 16:15:24 +08:00
Ke Ding
e80e567817 Add gpu support for ChatQnA (#308)
* add gpu support for chatqna

Signed-off-by: Ding, Ke <ke.ding@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Ding, Ke <ke.ding@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-21 22:24:18 +08:00
Ying Chun Guo
4fecd6a850 Add image build job in docker compose e2e gaudi test in CI (#305)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-21 14:22:34 +08:00
chen, suyue
01eed84db1 fix the image build refer (#309)
Signed-off-by: chensuyue <suyue.chen@intel.com>
2024-06-20 10:49:05 +08:00
Ying Chun Guo
a0b94b5401 Add image build job in docker compose e2e xeon test in CI (#304)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-19 15:24:27 +08:00
Ying Chun Guo
a1a384e1fa Fix missing Dockerfiles path in GenAIComps (#303)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-18 11:41:17 +08:00
Ying Chun Guo
654e2a0d72 enable building latest megaservice image on push event in CI (#288)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-17 14:24:04 +08:00
ZePan110
c3b641f8a8 Check the Dockerfile path (#292)
Signed-off-by: zepan <ze.pan@intel.com>
2024-06-14 19:19:36 +08:00
Sihan Chen
2b51374416 update img location (#282)
Signed-off-by: Spycsh <sihan.chen@intel.com>
2024-06-14 09:47:33 +08:00
Ying Chun Guo
961abb3c05 Create reuse workflow for get-test-matrix in CI (#283)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-14 09:23:06 +08:00
Ying Chun Guo
2fb070dbfd Fix dataprep microservice path issue (#284)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-13 17:39:16 +08:00
Ying Chun Guo
c5f3095ea5 Add docker build job in manifest e2e workflow (#274)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-13 11:34:27 +08:00
Sihan Chen
2a48601227 support/optimize ASR on HPU (#280)
* optimize asr on hpu

Signed-off-by: Spycsh <sihan.chen@intel.com>
2024-06-12 17:42:31 +08:00
Zhou Ting
240587932b Add no_proxy in docker compose yaml for micro services (#267)
Signed-off-by: Zhou Ting <ting.z.zhou@intel.com>
2024-06-12 14:13:25 +08:00
Steve Fowler
f2a94377aa Updated docker_compose.yaml (#278) 2024-06-12 10:06:40 +08:00
ctao456
5ade6865c9 [CodeGen] Add correct ip to no_proxy list; add no_proxy env for all services; add ui response in readme (#279)
* add no_proxy for all microservices

Signed-off-by: Chun Tao <chun.tao@intel.com>

* Update readme

Signed-off-by: Chun Tao <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Chun Tao <chun.tao@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-12 09:27:25 +08:00
Louie Tsai
29de55da3c [DocSums] Fix doc sum issues (#257)
* Update README.md for docker instruction issues

some fixes for docker build instructions

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* Update README.md for new frontend

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* Update README.md for output example

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* pre-commit change

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

* fix for pre-commit

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>

---------

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-06-12 09:25:17 +08:00
ctao456
99eb6a6a7e [ChatQnA] Add correct ip to no_proxy list, and add no_proxy env for embedding and reranking containers (#271)
* Update README.md

Signed-off-by: ctao456 <chun.tao@intel.com>

* Update docker_compose.yaml

Signed-off-by: ctao456 <chun.tao@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Signed-off-by: ctao456 <chun.tao@intel.com>

* Add no_proxy to all services

Signed-off-by: Chun Tao <chun.tao@intel.com>

* Update readme to include UI demo

Signed-off-by: Chun Tao <chun.tao@intel.com>

---------

Signed-off-by: ctao456 <chun.tao@intel.com>
Signed-off-by: Chun Tao <chun.tao@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-12 09:16:54 +08:00
chen, suyue
5715e9757e Use common security content for OPEA projects (#276)
* delete CODE_OF_CONDUCT.md

Signed-off-by: chensuyue <suyue.chen@intel.com>

* unify the additional content

Signed-off-by: chensuyue <suyue.chen@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: chensuyue <suyue.chen@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-11 22:21:41 +08:00
WenjiaoYue
4d36def840 Update img storage location (#265)
Signed-off-by: Yue, Wenjiao <wenjiao.yue@intel.com>
Signed-off-by: Spycsh <sihan.chen@intel.com>
Signed-off-by: letonghan <letong.han@intel.com>
Signed-off-by: zehao-intel <zehao.huang@intel.com>
2024-06-11 16:26:48 +08:00
Sihan Chen
02c7baae2b Remove useless scheduling statements (#273)
* remove useless schedule

Signed-off-by: Spycsh <sihan.chen@intel.com>

* remove blank line

Signed-off-by: Spycsh <sihan.chen@intel.com>

---------

Signed-off-by: Spycsh <sihan.chen@intel.com>
2024-06-11 11:51:42 +08:00
Louie Tsai
60b1696530 [CodeTrans]Update README.md for docker build issue and UI (#259)
* Update README.md for docker build issue and UI

fix docker build issues and add UI section

Signed-off-by: Tsai, Louie <louie.tsai@intel.com>
2024-06-11 07:07:40 +08:00
Sun, Xuehao
b967f60536 remove exit statement in bum_list_check.yml (#268)
Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
2024-06-07 16:52:48 +08:00
Dan
e3289477b0 Fix docker paths in examples (#260)
Signed-off-by: Dan Middleton <dan.middleton@intel.com>
2024-06-07 15:59:12 +08:00
sri-intel
44c5cb71fa Updated ReadMe for ChatQnA (#264)
* Update gaudi README.md

Modified path and added cd commands for copy paste instructions.

* Update xeon README.md

Added cd commands for reproducibility.

* Update README.md
2024-06-07 15:58:41 +08:00
yang yuhan
4d08310fdb Fixed incorrect cd command in README (#266)
Signed-off-by: PeterYang12 <yuhan.yang@intel.com>
Co-authored-by: chen-hu-97 <hu1.chen@intel.com>
2024-06-07 15:58:12 +08:00
Ying Chun Guo
26d6ea4724 Enable new CI runner and improve manifest e2e test scripts (#263)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-06 09:31:34 +08:00
huiyan2021
4250048b18 Fix path in README (#255)
Signed-off-by: Huiyan2021 <huiyan.cao@intel.com>
2024-06-05 09:41:47 +08:00
lvliang-intel
422b4bc56b Add support Qwen2 (#256)
Signed-off-by: lvliang-intel <liang1.lv@intel.com>
2024-06-04 21:21:28 +08:00
Ying Chun Guo
0c7f23cdc9 Remove hard coded port in ChatQnA to avoid conflict (#254)
Signed-off-by: Yingchun Guo <yingchun.guo@intel.com>
2024-06-04 17:36:24 +08:00
yqiu-intel
669ed25e97 Update README.md (#230)
* Update README.md

* Update README.md

---------

Co-authored-by: lvliang-intel <liang1.lv@intel.com>
Co-authored-by: Sihan Chen <39623753+Spycsh@users.noreply.github.com>
2024-06-04 13:45:23 +08:00
Sun, Xuehao
5c59dce71d Add check requirements workflow (#132)
* Add workflow to check requirements in pull requests

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Signed-off-by: Sun, Xuehao <xuehao.sun@intel.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-03 17:42:56 +08:00
Ethan Wong
8a5ef62d2a Fixed incorrect cd command in README (#252)
Signed-off-by: Ethan Wong <ethanwongca@gmail.com>
2024-06-03 08:54:22 +08:00
1220 changed files with 89638 additions and 21484 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
* text=auto eol=lf

13
.github/CODEOWNERS vendored Executable file
View File

@@ -0,0 +1,13 @@
/AgentQnA/ xuhui.ren@intel.com
/AudioQnA/ sihan.chen@intel.com
/ChatQnA/ liang1.lv@intel.com
/CodeGen/ liang1.lv@intel.com
/CodeTrans/ sihan.chen@intel.com
/DocSum/ letong.han@intel.com
/DocIndexRetriever/ xuhui.ren@intel.com chendi.xue@intel.com
/FaqGen/ xinyao.wang@intel.com
/SearchQnA/ sihan.chen@intel.com
/Translation/ liang1.lv@intel.com
/VisualQnA/ liang1.lv@intel.com
/ProductivitySuite/ hoong.tee.yeoh@intel.com
/*/ liang1.lv@intel.com

View File

@@ -0,0 +1,128 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Report Bug
description: Used to report bug
title: "[Bug]"
body:
- type: dropdown
id: priority
attributes:
label: Priority
options:
- Undecided
- P1-Stopper
- P2-High
- P3-Medium
- P4-Low
default: 0
validations:
required: true
- type: dropdown
id: os
attributes:
label: OS type
options:
- Ubuntu
- RedHat
- SUSE
- Windows
- Mac
- BSD
- Other (Please let us know in description)
validations:
required: true
- type: dropdown
id: hardware
attributes:
label: Hardware type
options:
- Xeon-GNR
- Xeon-EMR
- Xeon-SPR
- Xeon-ICX
- Xeon-other (Please let us know in description)
- Gaudi3
- Gaudi2
- AI-PC (Please let us know in description)
- CPU-other (Please let us know in description)
- GPU-PVC
- GPU-Flex
- GPU-Arc
- GPU-Arc-MTL
- GPU-Nvidia
- GPU-AMD
- GPU-other (Please let us know in description)
validations:
required: true
- type: checkboxes
id: install
attributes:
label: Installation method
options:
- label: Pull docker images from hub.docker.com
- label: Build docker images from source
validations:
required: true
- type: checkboxes
id: deploy
attributes:
label: Deploy method
options:
- label: Docker compose
- label: Docker
- label: Kubernetes
- label: Helm
validations:
required: true
- type: dropdown
id: node
attributes:
label: Running nodes
options:
- Single Node
- Multiple Nodes
default: 0
validations:
required: true
- type: textarea
id: version
attributes:
label: What's the version?
description: Docker ID in hub.docker.com or commit ID of Dockerfile.
placeholder:
validations:
required: true
- type: textarea
id: problem
attributes:
label: Description
description: What is the problem, question, or error?
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: Reproduce steps
description:
validations:
required: true
- type: textarea
id: log
attributes:
label: Raw log
description: Provide the log of RESTFul API or docker for micro-service by `docker logs CONTAINER`
render: shell
validations:
required: false

View File

@@ -0,0 +1,79 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Report Feature
description: Used to report feature
title: "[Feature]"
body:
- type: dropdown
id: priority
attributes:
label: Priority
options:
- Undecided
- P1-Stopper
- P2-High
- P3-Medium
- P4-Low
default: 0
validations:
required: true
- type: dropdown
id: os
attributes:
label: OS type
options:
- Ubuntu
- RedHat
- SUSE
- Windows
- Mac
- BSD
- Other (Please let us know in description)
validations:
required: true
- type: dropdown
id: hardware
attributes:
label: Hardware type
options:
- Xeon-GNR
- Xeon-EMR
- Xeon-SPR
- Xeon-ICX
- Xeon-other (Please let us know in description)
- Gaudi3
- Gaudi2
- AI-PC (Please let us know in description)
- CPU-other (Please let us know in description)
- GPU-PVC
- GPU-Flex
- GPU-Arc
- GPU-Arc-MTL
- GPU-Nvidia
- GPU-AMD
- GPU-other (Please let us know in description)
validations:
required: true
- type: dropdown
id: node
attributes:
label: Running nodes
options:
- Single Node
- Multiple Nodes
default: 0
validations:
required: true
- type: textarea
id: problem
attributes:
label: Description
description: Describe your problem and expectation, avoid to ask solution (we would provide better solution).
placeholder: As cloud/AI PC user, I want xxxx, so that I/customer can xxx.
validations:
required: true

View File

@@ -1,2 +1,4 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
blank_issues_enabled: true

View File

@@ -13,6 +13,7 @@ List the type of change like below. Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would break existing design and interface)
- [ ] Others (enhancement, documentation, validation, etc.)
## Dependencies

View File

@@ -1,106 +0,0 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: E2E test with docker compose
on:
pull_request_target:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/docker/**"
- "**/tests/**"
- "**/ui/**"
- "!**.md"
- "!**.txt"
- .github/workflows/E2E_test_with_compose.yml
workflow_dispatch:
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
job1:
name: Get-test-matrix
runs-on: ubuntu-latest
outputs:
run_matrix: ${{ steps.get-test-matrix.outputs.run_matrix }}
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0
- name: Get test matrix
id: get-test-matrix
run: |
set -xe
merged_commit=$(git log -1 --format='%H')
changed_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${merged_commit} | \
grep -vE '.github|README.md|*.txt|deprecate|kubernetes|manifest')
examples=$(printf '%s\n' "${changed_files[@]}" | grep '/' | cut -d'/' -f1 | sort -u)
run_matrix="{\"include\":["
for example in ${examples}; do
run_hardware=""
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c gaudi) != 0 ]; then run_hardware="gaudi"; fi
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c xeon) != 0 ]; then run_hardware="xeon ${run_hardware}"; fi
if [ "$run_hardware" = "" ]; then run_hardware="xeon"; fi
for hw in ${run_hardware}; do
run_matrix="${run_matrix}{\"example\":\"${example}\",\"hardware\":\"${hw}\"},"
done
done
run_matrix=$run_matrix"]}"
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT
Example-test:
needs: job1
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
runs-on: ${{ matrix.hardware }}
continue-on-error: true
steps:
- name: Test example
run: |
echo "Matrix - example ${{ matrix.example }}, hardware ${{ matrix.hardware }}"
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- name: Run test
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
example: ${{ matrix.example }}
hardware: ${{ matrix.hardware }}
run: |
cd ${{ github.workspace }}/$example/tests
example_l=$(echo $example | tr '[:upper:]' '[:lower:]')
if [ -f test_${example_l}_on_${hardware}.sh ]; then timeout 30m bash test_${example_l}_on_${hardware}.sh; else echo "Test script not found, skip test!"; fi
- name: Clean up container
env:
example: ${{ matrix.example }}
hardware: ${{ matrix.hardware }}
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/$example/docker/$hardware
container_list=$(cat docker_compose.yaml | grep container_name | cut -d':' -f2)
for container_name in $container_list; do
cid=$(docker ps -aq --filter "name=$container_name")
if [[ ! -z "$cid" ]]; then docker stop $cid && docker rm $cid && sleep 1s; fi
done
echo y | docker system prune
- name: Publish pipeline artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.example }}-${{ matrix.hardware }}
path: ${{ github.workspace }}/${{ matrix.example }}/tests/*.log

121
.github/workflows/_example-workflow.yml vendored Normal file
View File

@@ -0,0 +1,121 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Example jobs
permissions: read-all
on:
workflow_call:
inputs:
node:
required: true
type: string
example:
required: true
type: string
tag:
default: "latest"
required: false
type: string
build:
default: true
required: false
type: boolean
test_compose:
default: false
required: false
type: boolean
test_k8s:
default: false
required: false
type: boolean
test_gmc:
default: false
required: false
type: boolean
opea_branch:
default: "main"
required: false
type: string
jobs:
####################################################################################################
# Image Build
####################################################################################################
build-images:
runs-on: "docker-build-${{ inputs.node }}"
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Get Checkout Ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
echo "CHECKOUT_REF=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV
else
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
fi
- name: Checkout out GenAIExamples
uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Clone Required Repo
run: |
cd ${{ github.workspace }}/${{ inputs.example }}/docker_image_build
docker_compose_path=${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml
if [[ $(grep -c "vllm:" ${docker_compose_path}) != 0 ]]; then
git clone https://github.com/vllm-project/vllm.git
cd vllm && git rev-parse HEAD && cd ../
fi
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps && git checkout ${{ inputs.opea_branch }} && git rev-parse HEAD && cd ../
- name: Build Image
if: ${{ fromJSON(inputs.build) }}
uses: opea-project/validation/actions/image-build@main
with:
work_dir: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build
docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml
registry: ${OPEA_IMAGE_REPO}opea
tag: ${{ inputs.tag }}
####################################################################################################
# Docker Compose Test
####################################################################################################
test-example-compose:
needs: [build-images]
if: ${{ fromJSON(inputs.test_compose) }}
uses: ./.github/workflows/_run-docker-compose.yml
with:
tag: ${{ inputs.tag }}
example: ${{ inputs.example }}
hardware: ${{ inputs.node }}
secrets: inherit
####################################################################################################
# K8S Test
####################################################################################################
test-k8s-manifest:
needs: [build-images]
if: ${{ fromJSON(inputs.test_k8s) }}
uses: ./.github/workflows/_manifest-e2e.yml
with:
example: ${{ inputs.example }}
hardware: ${{ inputs.node }}
tag: ${{ inputs.tag }}
context: "CD"
secrets: inherit
####################################################################################################
# GMC Test
####################################################################################################
test-gmc-pipeline:
needs: [build-images]
if: ${{ fromJSON(inputs.test_gmc) }}
uses: ./.github/workflows/_gmc-e2e.yml
with:
example: ${{ inputs.example }}
hardware: ${{ inputs.node }}
secrets: inherit

54
.github/workflows/_get-image-list.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Get Image List
permissions: read-all
on:
workflow_call:
inputs:
examples:
default: ""
required: false
type: string
images:
default: ""
required: false
type: string
outputs:
matrix:
description: "Image List"
value: ${{ jobs.get-image-list.outputs.matrix }}
jobs:
get-image-list:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.get-matrix.outputs.matrix }}
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
- name: Set Matrix
id: get-matrix
run: |
image_list=[]
if [[ ! -z "${{ inputs.examples }}" ]]; then
pip install yq
examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
for example in ${examples[@]}
do
images=$(cat ${{ github.workspace }}/${example}/docker_image_build/build.yaml | yq -r '.[]' | jq 'keys' | jq -c '.')
image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${images}))
done
fi
if [[ ! -z "${{ inputs.images }}" ]]; then
images=($(echo ${{ inputs.images }} | tr ',' ' '))
input_image_list=$(printf '%s\n' "${images[@]}" | sort -u | jq -R '.' | jq -sc '.')
image_list=$(echo ${image_list} | jq -s '.[0] + .[1] | unique' - <(echo ${input_image_list}))
fi
echo "print image list..."
echo "$image_list" | jq . | jq -r '.[]'
echo "end of image list..."
echo "matrix=$(echo ${image_list} | jq -c '.')" >> $GITHUB_OUTPUT

63
.github/workflows/_get-test-matrix.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# Support push and pull_request events
name: Get Test Matrix
permissions: read-all
on:
workflow_call:
inputs:
diff_excluded_files:
required: false
type: string
default: '.github|README.md|*.txt'
test_mode:
required: false
type: string
default: 'docker_compose'
outputs:
run_matrix:
description: "The matrix string"
value: ${{ jobs.job1.outputs.run_matrix }}
jobs:
job1:
name: Get-test-matrix
runs-on: ubuntu-latest
outputs:
run_matrix: ${{ steps.get-test-matrix.outputs.run_matrix }}
steps:
- name: Get checkout ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
echo "CHECKOUT_REF=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV
else
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
fi
echo "checkout ref ${{ env.CHECKOUT_REF }}"
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Get test matrix
id: get-test-matrix
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
LATEST_COMMIT_SHA=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/opea-project/GenAIExamples/commits?sha=${{ github.event.pull_request.base.ref }}" | jq -r '.[0].sha')
echo "Latest commit SHA is $LATEST_COMMIT_SHA"
base_commit=$LATEST_COMMIT_SHA
else
base_commit=$(git rev-parse HEAD~1) # push event
fi
merged_commit=$(git log -1 --format='%H')
changed_files="$(git diff --name-only ${base_commit} ${merged_commit} | \
grep -vE '${{ inputs.diff_excluded_files }}')" || true
echo "changed_files=$changed_files"
export changed_files=$changed_files
export test_mode=${{ inputs.test_mode }}
export WORKSPACE=${{ github.workspace }}
bash .github/workflows/scripts/get_test_matrix.sh

87
.github/workflows/_gmc-e2e.yml vendored Normal file
View File

@@ -0,0 +1,87 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# This workflow will only test GMC pipeline and will not install GMC any more
name: Single GMC E2e Test For CD Workflow Call
on:
workflow_call:
inputs:
example:
default: "ChatQnA"
description: "The example to test on K8s"
required: true
type: string
hardware:
default: "xeon"
description: "Nodes to run the test, xeon or gaudi"
required: true
type: string
jobs:
gmc-test:
runs-on: "k8s-${{ inputs.hardware }}"
continue-on-error: true
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Get checkout ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
echo "CHECKOUT_REF=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV
else
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
fi
echo "checkout ref ${{ env.CHECKOUT_REF }}"
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Set variables
run: |
echo "IMAGE_REPO=$OPEA_IMAGE_REPO" >> $GITHUB_ENV
lower_example=$(echo "${{ inputs.example }}" | tr '[:upper:]' '[:lower:]')
echo "APP_NAMESPACE=$lower_example-$(tr -dc a-z0-9 </dev/urandom | head -c 16)" >> $GITHUB_ENV
echo "ROLLOUT_TIMEOUT_SECONDS=1800s" >> $GITHUB_ENV
echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
echo "continue_test=true" >> $GITHUB_ENV
echo "should_cleanup=false" >> $GITHUB_ENV
echo "APP_NAMESPACE=$APP_NAMESPACE"
- name: Run tests
id: run-test
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
GOOGLE_CSE_ID: ${{ secrets.GOOGLE_CSE_ID }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
if [[ ! -f ${{ github.workspace }}/${{ inputs.example }}/tests/test_gmc_on_${{ inputs.hardware }}.sh ]]; then
echo "No test script found, exist test!"
exit 0
else
echo "should_cleanup=true" >> $GITHUB_ENV
${{ github.workspace }}/${{ inputs.example }}/tests/test_gmc_on_${{ inputs.hardware }}.sh install_${{ inputs.example }}
echo "Testing ${{ inputs.example }}, waiting for pod ready..."
if kubectl rollout status deployment --namespace "$APP_NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
echo "Testing gmc ${{ inputs.example }}, running validation test..."
${{ github.workspace }}/${{ inputs.example }}/tests/test_gmc_on_${{ inputs.hardware }}.sh validate_${{ inputs.example }}
else
echo "Timeout waiting for pods in namespace $APP_NAMESPACE to be ready!"
exit 1
fi
sleep 60
fi
- name: Kubectl uninstall
if: always()
run: |
if $should_cleanup; then
if ! kubectl delete ns $APP_NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
kubectl delete pods --namespace $APP_NAMESPACE --force --grace-period=0 --all
kubectl delete ns $APP_NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
fi
fi

146
.github/workflows/_gmc-workflow.yml vendored Normal file
View File

@@ -0,0 +1,146 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Build and deploy GMC system on call and manual
on:
workflow_dispatch:
inputs:
tag:
default: "latest"
required: true
type: string
description: "Tag to apply to images"
node:
default: "xeon"
required: true
type: string
description: "Hardware to run test"
opea_branch:
default: "main"
required: false
type: string
description: 'OPEA branch for image build'
workflow_call:
inputs:
tag:
default: "latest"
required: true
type: string
description: "Tag to apply to images"
node:
default: "xeon"
required: true
type: string
description: "Hardware to run test"
opea_branch:
default: "main"
required: false
type: string
description: 'OPEA branch for image build'
jobs:
####################################################################################################
# Image Build and Scan
####################################################################################################
image-build:
runs-on: "docker-build-${{ inputs.node }}"
steps:
- name: Checkout GenAIInfra repository
uses: actions/checkout@v4
with:
repository: opea-project/GenAIInfra
ref: ${{ inputs.opea_branch }}
path: GenAIInfra
- name: Set variables
id: set_variables
run: |
echo "DOCKER_REGISTRY=${OPEA_IMAGE_REPO}opea" >> $GITHUB_ENV
echo "IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_OUTPUT
echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
echo "VERSION=${{ inputs.tag }}" >> $GITHUB_OUTPUT
- name: Build image and push
run: |
cd ${{github.workspace}}/GenAIInfra/microservices-connector
make docker.build
make docker.push
- name: Scan gmcmanager
if: ${{ inputs.node == 'gaudi' }}
uses: opea-project/validation/actions/trivy-scan@main
with:
image-ref: ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
output: gmcmanager-scan.txt
- name: Upload gmcmanager scan result
if: ${{ inputs.node == 'gaudi' }}
uses: actions/upload-artifact@v4.3.4
with:
name: gmcmanager-scan
path: gmcmanager-scan.txt
overwrite: true
- name: Scan gmcrouter
if: ${{ inputs.node == 'gaudi' }}
uses: opea-project/validation/actions/trivy-scan@main
with:
image-ref: ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
output: gmcrouter-scan.txt
- name: Upload gmcrouter scan result
if: ${{ inputs.node == 'gaudi' }}
uses: actions/upload-artifact@v4.3.4
with:
name: gmcrouter-scan
path: gmcrouter-scan.txt
overwrite: true
- name: Clean up images
if: always()
run: |
docker rmi ${{ env.DOCKER_REGISTRY }}/gmcrouter:${{ env.VERSION }}
docker rmi ${{ env.DOCKER_REGISTRY }}/gmcmanager:${{ env.VERSION }}
- name: Clean up GenAIInfra source codes
if: always()
run: |
rm -rf ${{github.workspace}}/GenAIInfra
####################################################################################################
# GMC Install
####################################################################################################
gmc-install:
needs: image-build
runs-on: "k8s-${{ inputs.node }}"
steps:
- name: Checkout GenAIInfra repository
uses: actions/checkout@v4
with:
repository: opea-project/GenAIInfra
ref: ${{ inputs.opea_branch }}
path: GenAIInfra
- name: Set variables
run: |
echo "SYSTEM_NAMESPACE=opea-system" >> $GITHUB_ENV
echo "VERSION=${{ inputs.tag }}" >> $GITHUB_ENV
echo "SET_VERSION=true" >> $GITHUB_ENV # to change the tag of microservice images
- name: Cleanup existing GMC
run: |
cd GenAIInfra
.github/workflows/scripts/e2e/gmc_install.sh cleanup_gmc
cd ..
- name: Install GMC
run: |
cd GenAIInfra
.github/workflows/scripts/e2e/gmc_install.sh install_gmc
cd ..
- name: Clean up GenAIInfra source codes
if: always()
run: |
rm -rf ${{github.workspace}}/GenAIInfra

111
.github/workflows/_manifest-e2e.yml vendored Normal file
View File

@@ -0,0 +1,111 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Single Kubernetes Manifest E2e Test For Call
on:
workflow_call:
inputs:
example:
default: "ChatQnA"
description: "The example to test on K8s"
required: true
type: string
hardware:
default: "xeon"
description: "Nodes to run the test, xeon or gaudi"
required: true
type: string
tag:
default: "latest"
description: "Tag to apply to images, default is latest"
required: false
type: string
context:
default: "CI"
description: "CI or CD"
required: false
type: string
jobs:
manifest-test:
runs-on: "k8s-${{ inputs.hardware }}"
continue-on-error: true
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Get checkout ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
echo "CHECKOUT_REF=refs/pull/${{ github.event.number }}/merge" >> $GITHUB_ENV
else
echo "CHECKOUT_REF=${{ github.ref }}" >> $GITHUB_ENV
fi
echo "checkout ref ${{ env.CHECKOUT_REF }}"
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: ${{ env.CHECKOUT_REF }}
fetch-depth: 0
- name: Set variables
run: |
echo "IMAGE_REPO=$OPEA_IMAGE_REPO" >> $GITHUB_ENV
echo "IMAGE_TAG=${{ inputs.tag }}" >> $GITHUB_ENV
lower_example=$(echo "${{ inputs.example }}" | tr '[:upper:]' '[:lower:]')
echo "NAMESPACE=$lower_example-$(tr -dc a-z0-9 </dev/urandom | head -c 16)" >> $GITHUB_ENV
echo "ROLLOUT_TIMEOUT_SECONDS=1800s" >> $GITHUB_ENV
echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
echo "continue_test=true" >> $GITHUB_ENV
echo "should_cleanup=false" >> $GITHUB_ENV
echo "skip_validate=true" >> $GITHUB_ENV
echo "CONTEXT=${{ inputs.context }}" >> $GITHUB_ENV
echo "NAMESPACE=$NAMESPACE"
- name: Kubectl install
id: install
run: |
if [[ ! -f ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh ]]; then
echo "No test script found, exist test!"
exit 0
else
${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh init_${{ inputs.example }}
echo "should_cleanup=true" >> $GITHUB_ENV
kubectl create ns $NAMESPACE
${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh install_${{ inputs.example }} $NAMESPACE
echo "Testing ${{ inputs.example }}, waiting for pod ready..."
if kubectl rollout status deployment --namespace "$NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
echo "Testing manifests ${{ inputs.example }}, waiting for pod ready done!"
echo "skip_validate=false" >> $GITHUB_ENV
else
echo "Timeout waiting for pods in namespace $NAMESPACE to be ready!"
.github/workflows/scripts/k8s-utils.sh dump_pods_status $NAMESPACE
exit 1
fi
sleep 60
fi
- name: Validate e2e test
if: always()
run: |
if $skip_validate; then
echo "Skip validate"
else
if ${{ github.workspace }}/${{ inputs.example }}/tests/test_manifest_on_${{ inputs.hardware }}.sh validate_${{ inputs.example }} $NAMESPACE ; then
echo "Validate ${{ inputs.example }} successful!"
else
echo "Validate ${{ inputs.example }} failure!!!"
.github/workflows/scripts/k8s-utils.sh dump_all_pod_logs $NAMESPACE
fi
fi
- name: Kubectl uninstall
if: always()
run: |
if $should_cleanup; then
if ! kubectl delete ns $NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
kubectl delete pods --namespace $NAMESPACE --force --grace-period=0 --all
kubectl delete ns $NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
fi
fi

View File

@@ -0,0 +1,150 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Image Build
permissions: read-all
on:
workflow_call:
inputs:
registry:
description: Container Registry URL
required: false
default: ""
type: string
tag:
description: Container Tag
required: false
default: "latest"
type: string
example:
description: Example to test
required: true
type: string
hardware:
description: Hardware to run the test on
required: true
type: string
diff_excluded_files:
required: false
type: string
default: ""
jobs:
get-test-case:
runs-on: ubuntu-latest
outputs:
test_cases: ${{ steps.test-case-matrix.outputs.test_cases }}
CHECKOUT_REF: ${{ steps.get-checkout-ref.outputs.CHECKOUT_REF }}
steps:
- name: Get checkout ref
id: get-checkout-ref
run: |
if [ "${{ github.event_name }}" == "pull_request" ] || [ "${{ github.event_name }}" == "pull_request_target" ]; then
CHECKOUT_REF=refs/pull/${{ github.event.number }}/merge
else
CHECKOUT_REF=${{ github.ref }}
fi
echo "CHECKOUT_REF=${CHECKOUT_REF}" >> $GITHUB_OUTPUT
echo "checkout ref ${CHECKOUT_REF}"
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: ${{ steps.get-checkout-ref.outputs.CHECKOUT_REF }}
fetch-depth: 0
- name: Get test matrix
shell: bash
id: test-case-matrix
run: |
example_l=$(echo ${{ inputs.example }} | tr '[:upper:]' '[:lower:]')
cd ${{ github.workspace }}/${{ inputs.example }}/tests
run_test_cases=""
default_test_case=$(find . -type f -name "test_compose_on_${{ inputs.hardware }}.sh" | cut -d/ -f2)
if [ "$default_test_case" ]; then run_test_cases="$default_test_case"; fi
other_test_cases=$(find . -type f -name "test_compose_*_on_${{ inputs.hardware }}.sh" | cut -d/ -f2)
echo "default_test_case=$default_test_case"
echo "other_test_cases=$other_test_cases"
if [ "${{ inputs.tag }}" == "ci" ]; then
base_commit=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/opea-project/GenAIExamples/commits?sha=${{ github.event.pull_request.base.ref }}" | jq -r '.[0].sha')
merged_commit=$(git log -1 --format='%H')
changed_files="$(git diff --name-only ${base_commit} ${merged_commit} | grep -vE '${{ inputs.diff_excluded_files }}')" || true
fi
for test_case in $other_test_cases; do
if [ "${{ inputs.tag }}" == "ci" ]; then
flag=${test_case%_on_*}
flag=${flag#test_compose_}
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${{ inputs.example }} | grep ${flag}) ]]; then
run_test_cases="$run_test_cases $test_case"
fi
else
run_test_cases="$run_test_cases $test_case"
fi
done
test_cases=$(echo $run_test_cases | tr ' ' '\n' | sort -u | jq -R '.' | jq -sc '.')
echo "test_cases=$test_cases"
echo "test_cases=$test_cases" >> $GITHUB_OUTPUT
run-test:
needs: [get-test-case]
strategy:
matrix:
test_case: ${{ fromJSON(needs.get-test-case.outputs.test_cases) }}
fail-fast: false
runs-on: ${{ inputs.hardware }}
continue-on-error: true
steps:
- name: Clean up Working Directory
run: |
sudo rm -rf ${{github.workspace}}/* || true
docker system prune -f
docker rmi $(docker images --filter reference="*/*/*:latest" -q) || true
docker rmi $(docker images --filter reference="*/*:ci" -q) || true
- name: Checkout out Repo
uses: actions/checkout@v4
with:
ref: ${{ needs.get-test-case.outputs.CHECKOUT_REF }}
fetch-depth: 0
- name: Run test
shell: bash
env:
HUGGINGFACEHUB_API_TOKEN: ${{ secrets.HUGGINGFACEHUB_API_TOKEN }}
GOOGLE_CSE_ID: ${{ secrets.GOOGLE_CSE_ID }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
PINECONE_KEY: ${{ secrets.PINECONE_KEY }}
IMAGE_REPO: ${{ inputs.registry }}
IMAGE_TAG: ${{ inputs.tag }}
example: ${{ inputs.example }}
hardware: ${{ inputs.hardware }}
test_case: ${{ matrix.test_case }}
run: |
cd ${{ github.workspace }}/$example/tests
if [[ "$IMAGE_REPO" == "" ]]; then export IMAGE_REPO="${OPEA_IMAGE_REPO}opea"; fi
if [ -f ${test_case} ]; then timeout 30m bash ${test_case}; else echo "Test script {${test_case}} not found, skip test!"; fi
- name: Clean up container
shell: bash
if: cancelled() || failure()
run: |
cd ${{ github.workspace }}/${{ inputs.example }}/docker_compose
test_case=${{ matrix.test_case }}
flag=${test_case%_on_*}
flag=${flag#test_}
yaml_file=$(find . -type f -wholename "*${{ inputs.hardware }}/${flag}.yaml")
echo $yaml_file
docker compose -f $yaml_file stop && docker compose -f $yaml_file rm -f || true
docker system prune -f
docker rmi $(docker images --filter reference="*:5000/*/*" -q) || true
- name: Publish pipeline artifact
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.example }}_${{ matrix.test_case }}
path: ${{ github.workspace }}/${{ inputs.example }}/tests/*.log

View File

@@ -1,44 +0,0 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Container Build
permissions: read-all
on:
workflow_dispatch:
schedule:
- cron: "35 1 * * 5"
jobs:
# https://github.com/intel/ai-containers/blob/main/.github/action.yml
build-containers:
runs-on: docker
env:
REGISTRY: ${{ secrets.REGISTRY }}
REPO: ${{ secrets.REPO }}
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} build --no-cache
working-directory: .github/workflows/docker
- name: Print Containers to Summary
run: |
docker compose -p ${GITHUB_RUN_NUMBER} images --format json | jq -r --arg registry "$REGISTRY" '.[] | select(.Repository | contains($registry)) | .Tag' >> $GITHUB_STEP_SUMMARY
- name: Push Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} push
working-directory: .github/workflows/docker
- name: Un-Tag Containers
run: |
docker compose -p ${GITHUB_RUN_NUMBER} down --rmi all
working-directory: .github/workflows/docker
- name: Remove Containers
if: always()
run: docker system prune --force

View File

@@ -4,7 +4,7 @@
ARG UBUNTU_VER=22.04
FROM ubuntu:${UBUNTU_VER} as devel
ENV LANG C.UTF-8
ENV LANG=C.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends --fix-missing \
aspell \

View File

@@ -1,29 +0,0 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
chatqna-megaservice-server:
build:
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
context: ../../../ChatQnA/microservice/xeon
dockerfile: docker/Dockerfile
image: ${REGISTRY}/${REPO}:chatqna-megaservice-server
pull_policy: always
chatqna-ui-server:
build:
context: ../../../ChatQnA/ui
extends: chatqna-megaservice-server
image: ${REGISTRY}/${REPO}:chatqna-ui-server
codegen-megaservice-server:
build:
context: ../../../CodeGen/microservice/xeon
extends: chatqna-megaservice-server
image: ${REGISTRY}/${REPO}:codegen-megaservice-server
codegen-ui-server:
build:
context: ../../../CodeGen/ui
extends: chatqna-megaservice-server
image: ${REGISTRY}/${REPO}:codegen-ui-server

View File

@@ -1,127 +0,0 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: E2E test with manifests
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/kubernetes/manifests/**"
- "**/tests/**"
- "!**.md"
- "!**.txt"
- .github/workflows/manifest-e2e.yml
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
job1:
name: Get-test-matrix
runs-on: ubuntu-latest
outputs:
run_matrix: ${{ steps.get-test-matrix.outputs.run_matrix }}
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get test matrix
id: get-test-matrix
run: |
set -xe
changed_files="$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | \
grep "/kubernetes/manifests/" | \
grep -vE '.github|deprecated|docker')" || true
examples=$(printf '%s\n' "${changed_files[@]}" | grep '/' | cut -d'/' -f1 | sort -u)
run_matrix="{\"include\":["
for example in ${examples}; do
run_hardware=""
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c gaudi) != 0 ]; then run_hardware="gaudi"; fi
if [ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c xeon) != 0 ]; then run_hardware="xeon ${run_hardware}"; fi
if [[ -z "$run_hardware" ]]; then run_hardware="xeon"; fi
for hw in ${run_hardware}; do
if [ $hw = "gaudi" ]; then
continue # skip gaudi for K8s test temporarily
else
#lower_example=$(echo "${example}" | tr '[:upper:]' '[:lower:]')
run_matrix="${run_matrix}{\"example\":\"${example}\",\"hardware\":\"inspur-icx-1\"},"
fi
done
done
run_matrix=$run_matrix"]}"
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT
manifest-test:
needs: job1
if: always() && ${{ needs.job1.outputs.run_matrix.include.length }} > 0
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
runs-on: ${{ matrix.hardware }}
continue-on-error: true
steps:
- name: E2e test manifest
run: |
echo "Matrix - manifest: ${{ matrix.example }}"
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set variables
run: |
lower_example=$(echo "${{ matrix.example }}" | tr '[:upper:]' '[:lower:]')
echo "NAMESPACE=$lower_example-$(date +%Y%m%d%H%M%S)" >> $GITHUB_ENV
echo "ROLLOUT_TIMEOUT_SECONDS=1800s" >> $GITHUB_ENV
echo "KUBECTL_TIMEOUT_SECONDS=60s" >> $GITHUB_ENV
echo "should_cleanup=false" >> $GITHUB_ENV
echo "skip_validate=false" >> $GITHUB_ENV
echo "NAMESPACE=$NAMESPACE"
- name: Initialize manifest testing
run: |
${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_xeon.sh init_${{ matrix.example }}
- name: Kubectl install
id: install
run: |
echo "should_cleanup=true" >> $GITHUB_ENV
kubectl create ns $NAMESPACE
${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_xeon.sh install_${{ matrix.example }} $NAMESPACE
echo "Testing ${{ matrix.example }}, waiting for pod ready..."
if kubectl rollout status deployment --namespace "$NAMESPACE" --timeout "$ROLLOUT_TIMEOUT_SECONDS"; then
echo "Testing manifests ${{ matrix.example }}, waiting for pod ready done!"
else
echo "Timeout waiting for pods in namespace $NAMESPACE to be ready!"
echo "skip_validate=true" >> $GITHUB_ENV
exit 1
fi
sleep 60
- name: Validate e2e test
if: always()
run: |
if $skip_validate; then
echo "Skip validate"
else
${{ github.workspace }}/${{ matrix.example }}/tests/test_manifest_on_xeon.sh validate_${{ matrix.example }} $NAMESPACE
fi
- name: Kubectl uninstall
if: always()
run: |
if $should_cleanup; then
if ! kubectl delete ns $NAMESPACE --timeout=$KUBECTL_TIMEOUT_SECONDS; then
kubectl delete pods --namespace $NAMESPACE --force --grace-period=0 --all
kubectl delete ns $NAMESPACE --force --grace-period=0 --timeout=$KUBECTL_TIMEOUT_SECONDS
fi
fi

View File

@@ -1,54 +0,0 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Manifests Validate
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/kubernetes/manifests/**"
- .github/workflows/manifest-validate.yaml
workflow_dispatch:
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
MANIFEST_DIR: "manifests"
jobs:
manifests-validate:
runs-on: ubuntu-latest
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: changed files
id: changed_files
run: |
set -xe
changed_folder=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | \
grep "kubernetes/manifests" | grep -vE '.github|README.md|*.txt|*.sh' | cut -d'/' -f1 | sort -u )
echo "changed_folder: $changed_folder"
if [ -z "$changed_folder" ]; then
echo "No changes in manifests folder"
echo "SKIP=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "SKIP=false" >> $GITHUB_OUTPUT
for folder in $changed_folder; do
folder_str="$folder_str $folder/kubernetes/manifests/"
done
echo "folder_str=$folder_str"
echo "folder_str=$folder_str" >> $GITHUB_ENV
- uses: docker://ghcr.io/yannh/kubeconform:latest
if: steps.changed_files.outputs.SKIP == 'false'
with:
args: "-summary -output json ${{env.folder_str}}"

View File

@@ -0,0 +1,59 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Examples publish docker image on manual event
on:
workflow_dispatch:
inputs:
node:
default: "gaudi"
description: "Hardware to run test"
required: true
type: string
examples:
default: ""
description: 'List of examples to publish [AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA]'
required: false
type: string
images:
default: ""
description: 'List of images to publish [gmcmanager,gmcrouter]'
required: false
type: string
tag:
default: "rc"
description: "Tag to publish, like [1.0rc]"
required: true
type: string
publish_tags:
default: "latest,1.x"
description: "Tag list apply to publish images, like [latest,1.0]"
required: false
type: string
permissions: read-all
jobs:
get-image-list:
uses: ./.github/workflows/_get-image-list.yml
with:
examples: ${{ inputs.examples }}
images: ${{ inputs.images }}
publish:
needs: [get-image-list]
strategy:
matrix:
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
runs-on: "docker-build-${{ inputs.node }}"
steps:
- uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Image Publish
uses: opea-project/validation/actions/image-publish@main
with:
local_image_ref: ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
image_name: opea/${{ matrix.image }}
publish_tags: ${{ inputs.publish_tags }}

113
.github/workflows/manual-docker-scan.yml vendored Normal file
View File

@@ -0,0 +1,113 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Examples docker images BoM/CVE scan on manual event
on:
workflow_dispatch:
inputs:
node:
default: "gaudi"
description: "Hardware to run scan"
required: true
type: string
examples:
default: ""
description: 'List of examples to publish "AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA"'
required: false
type: string
images:
default: ""
description: 'List of images to publish "gmcmanager,gmcrouter"'
required: false
type: string
tag:
default: "latest"
description: "Tag for images to scan"
required: true
type: string
sbom_scan:
default: true
description: 'Scan images for BoM'
required: false
type: boolean
trivy_scan:
default: true
description: 'Scan images for CVE'
required: false
type: boolean
permissions: read-all
jobs:
get-image-list:
uses: ./.github/workflows/_get-image-list.yml
with:
examples: ${{ inputs.examples }}
images: ${{ inputs.images }}
scan-docker:
needs: get-image-list
runs-on: "docker-build-${{ inputs.node }}"
strategy:
matrix:
image: ${{ fromJson(needs.get-image-list.outputs.matrix) }}
fail-fast: false
steps:
- name: Clean up Working Directory
run: |
sudo rm -rf ${{github.workspace}}/* || true
docker system prune -f
- name: Pull Image
run: |
docker pull ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }}
echo "OPEA_IMAGE_REPO=${OPEA_IMAGE_REPO}" >> $GITHUB_ENV
- name: SBOM Scan Container
uses: anchore/sbom-action@v0.17.1
if: ${{ inputs.sbom_scan }}
with:
image: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
output-file: ${{ matrix.image }}-sbom-scan.txt
format: 'spdx-json'
- name: Security Scan Container
uses: aquasecurity/trivy-action@0.24.0
if: ${{ inputs.trivy_scan }}
with:
image-ref: ${{ env.OPEA_IMAGE_REPO }}opea/${{ matrix.image }}:${{ inputs.tag }}
output: ${{ matrix.image }}-trivy-scan.txt
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Cleanup
if: always()
run: docker rmi -f ${OPEA_IMAGE_REPO}opea/${{ matrix.image }}:${{ inputs.tag }} || true
- name: Collect Logs
if: always()
run: |
mkdir -p /tmp/scan-${{ inputs.tag }}-${{ github.run_number }}
mv ${{ matrix.image }}-*-scan.txt /tmp/scan-${{ inputs.tag }}-${{ github.run_number }}
upload-artifacts:
needs: scan-docker
runs-on: "docker-build-${{ inputs.node }}"
if: always()
steps:
- uses: actions/upload-artifact@v4.3.4
with:
name: sbom-scan-${{ inputs.tag }}-${{ github.run_number }}
path: /tmp/scan-${{ inputs.tag }}-${{ github.run_number }}/*-sbom-scan.txt
overwrite: true
- uses: actions/upload-artifact@v4.3.4
with:
name: trivy-scan-${{ inputs.tag }}-${{ github.run_number }}
path: /tmp/scan-${{ inputs.tag }}-${{ github.run_number }}/*-trivy-scan.txt
overwrite: true
- name: Remove Logs
run: rm -rf /tmp/scan-${{ inputs.tag }}-${{ github.run_number }} && rm -rf /tmp/sbom-action-*

View File

@@ -0,0 +1,104 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Examples CD workflow on manual event
on:
workflow_dispatch:
inputs:
nodes:
default: "gaudi,xeon"
description: "Hardware to run test"
required: true
type: string
examples:
default: "ChatQnA"
description: 'List of examples to test [AudioQnA,ChatQnA,CodeGen,CodeTrans,DocSum,FaqGen,SearchQnA,Translation]'
required: true
type: string
tag:
default: "latest"
description: "Tag to apply to images"
required: true
type: string
deploy_gmc:
default: false
description: 'Whether to deploy gmc'
required: true
type: boolean
build:
default: true
description: 'Build test required images for Examples'
required: false
type: boolean
test_compose:
default: true
description: 'Test examples with docker compose'
required: false
type: boolean
test_k8s:
default: false
description: 'Test examples with k8s'
required: false
type: boolean
test_gmc:
default: false
description: 'Test examples with gmc'
required: false
type: boolean
opea_branch:
default: "main"
description: 'OPEA branch for image build'
required: false
type: string
permissions: read-all
jobs:
get-test-matrix:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.get-matrix.outputs.examples }}
nodes: ${{ steps.get-matrix.outputs.nodes }}
steps:
- name: Create Matrix
id: get-matrix
run: |
examples=($(echo ${{ inputs.examples }} | tr ',' ' '))
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "examples=$examples_json" >> $GITHUB_OUTPUT
nodes=($(echo ${{ inputs.nodes }} | tr ',' ' '))
nodes_json=$(printf '%s\n' "${nodes[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "nodes=$nodes_json" >> $GITHUB_OUTPUT
build-deploy-gmc:
needs: [get-test-matrix]
if: ${{ fromJSON(inputs.deploy_gmc) }}
strategy:
matrix:
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
fail-fast: false
uses: ./.github/workflows/_gmc-workflow.yml
with:
node: ${{ matrix.node }}
tag: ${{ inputs.tag }}
opea_branch: ${{ inputs.opea_branch }}
secrets: inherit
run-examples:
needs: [get-test-matrix, build-deploy-gmc]
if: always()
strategy:
matrix:
example: ${{ fromJson(needs.get-test-matrix.outputs.examples) }}
node: ${{ fromJson(needs.get-test-matrix.outputs.nodes) }}
fail-fast: false
uses: ./.github/workflows/_example-workflow.yml
with:
node: ${{ matrix.node }}
example: ${{ matrix.example }}
tag: ${{ inputs.tag }}
build: ${{ fromJSON(inputs.build) }}
test_compose: ${{ fromJSON(inputs.test_compose) }}
test_k8s: ${{ fromJSON(inputs.test_k8s) }}
test_gmc: ${{ fromJSON(inputs.test_gmc) }}
opea_branch: ${{ inputs.opea_branch }}
secrets: inherit

46
.github/workflows/manual-freeze-tag.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Freeze OPEA images release tag in readme on manual event
on:
workflow_dispatch:
inputs:
tag:
default: "latest"
description: "Tag to apply to images"
required: true
type: string
jobs:
freeze-tag:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Set up Git
run: |
git config --global user.name "NeuralChatBot"
git config --global user.email "grp_neural_chat_bot@intel.com"
git remote set-url origin https://NeuralChatBot:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
- name: Run script
run: |
find . -name "*.md" | xargs sed -i "s|^docker\ compose|TAG=${{ github.event.inputs.tag }}\ docker\ compose|g"
find . -type f -name "*.yaml" \( -path "*/benchmark/*" -o -path "*/kubernetes/*" \) | xargs sed -i -E 's/(opea\/[A-Za-z0-9\-]*:)latest/\1${{ github.event.inputs.tag }}/g'
find . -type f -name "*.md" \( -path "*/benchmark/*" -o -path "*/kubernetes/*" \) | xargs sed -i -E 's/(opea\/[A-Za-z0-9\-]*:)latest/\1${{ github.event.inputs.tag }}/g'
- name: Commit changes
run: |
git add .
git commit -s -m "Freeze OPEA images tag"
git push

50
.github/workflows/pr-bum_list_check.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Check Requirements
on: [pull_request]
jobs:
check-requirements:
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Save PR requirements
run: |
find . -name "requirements.txt" -exec cat {} \; | \
grep -v '^\s*#' | \
grep -v '^\s*$' | \
grep -v '^\s*-' | \
sed 's/^\s*//' | \
awk -F'[>=<]' '{print $1}' | \
sort -u > pr-requirements.txt
cat pr-requirements.txt
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: main
path: main-branch
- name: Save main branch requirements
run: |
find ./main-branch -name "requirements.txt" -exec cat {} \; | \
grep -v '^\s*#' | \
grep -v '^\s*$' | \
grep -v '^\s*-' | \
sed 's/^\s*//' | \
awk -F'[>=<]' '{print $1}' | \
sort -u > main-requirements.txt
cat main-requirements.txt
- name: Compare requirements
run: |
comm -23 pr-requirements.txt main-requirements.txt > added-packages.txt
if [ -s added-packages.txt ]; then
echo "New packages found in PR:" && cat added-packages.txt
else
echo "No new packages found😊."
fi

View File

@@ -0,0 +1,23 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: "Dependency Review"
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: "Checkout Repository"
uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
comment-summary-in-pr: "always"
fail-on-severity: "low"
warn-only: true
show-openssf-scorecard: false

View File

@@ -0,0 +1,46 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: E2E test with docker compose
on:
pull_request_target:
branches: ["main", "*rc"]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/Dockerfile**"
- "**.py"
- "**/docker_compose/**"
- "**/docker_image_build/**"
- "**/tests/test_compose**"
- "**/ui/**"
- "!**.md"
- "!**.txt"
- .github/workflows/pr-docker-compose-e2e.yml
# If there is a new commit, the previous jobs will be canceled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
get-test-matrix:
if: ${{ !github.event.pull_request.draft }}
uses: ./.github/workflows/_get-test-matrix.yml
with:
diff_excluded_files: '.github|*.md|*.txt|kubernetes|manifest|gmc|assets|benchmark'
example-test:
needs: [get-test-matrix]
strategy:
matrix: ${{ fromJSON(needs.get-test-matrix.outputs.run_matrix) }}
fail-fast: false
if: ${{ !github.event.pull_request.draft }}
uses: ./.github/workflows/_run-docker-compose.yml
with:
registry: "opea"
tag: "ci"
example: ${{ matrix.example }}
hardware: ${{ matrix.hardware }}
diff_excluded_files: '.github|*.md|*.txt|kubernetes|manifest|gmc|assets|benchmark'
secrets: inherit

36
.github/workflows/pr-gmc-e2e.yaml vendored Normal file
View File

@@ -0,0 +1,36 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: E2E test with GMC
on:
pull_request_target:
branches: ["main", "*rc"]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/kubernetes/**/gmc/**"
- "**/tests/test_gmc**"
- "!**.md"
- "!**.txt"
- "!**/kubernetes/**/manifests/**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
job1:
uses: ./.github/workflows/_get-test-matrix.yml
with:
diff_excluded_files: '.github|docker_compose|manifest|assets|*.md|*.txt'
test_mode: "gmc"
gmc-test:
needs: [job1]
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
uses: ./.github/workflows/_gmc-e2e.yml
with:
example: ${{ matrix.example }}
hardware: ${{ matrix.hardware }}
secrets: inherit

40
.github/workflows/pr-manifest-e2e.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: E2E test with manifests
on:
pull_request_target:
branches: ["main", "*rc"]
types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped
paths:
- "**/kubernetes/**/manifests/**"
- "**/tests/test_manifest**"
- "!**.md"
- "!**.txt"
- "!**/kubernetes/**/gmc/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
job1:
uses: ./.github/workflows/_get-test-matrix.yml
with:
diff_excluded_files: '.github|docker_compose|gmc|assets|*.md|*.txt|benchmark'
test_mode: "manifest"
run-example:
needs: job1
strategy:
matrix: ${{ fromJSON(needs.job1.outputs.run_matrix) }}
fail-fast: false
uses: ./.github/workflows/_example-workflow.yml
with:
node: ${{ matrix.hardware }}
example: ${{ matrix.example }}
tag: ${{ github.event.pull_request.head.sha }}
test_k8s: true
secrets: inherit

156
.github/workflows/pr-path-detection.yml vendored Normal file
View File

@@ -0,0 +1,156 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Check Paths and Hyperlinks
on:
pull_request:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize]
jobs:
check-dockerfile-paths:
runs-on: ubuntu-latest
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout Repo GenAIExamples
uses: actions/checkout@v4
- name: Clone Repo GenAIComps
run: |
cd ..
git clone https://github.com/opea-project/GenAIComps.git
- name: Check for Missing Dockerfile Paths in GenAIComps
run: |
cd ${{github.workspace}}
miss="FALSE"
while IFS=: read -r file line content; do
dockerfile_path=$(echo "$content" | awk -F '-f ' '{print $2}' | awk '{print $1}')
if [[ ! -f "../GenAIComps/${dockerfile_path}" ]]; then
miss="TRUE"
echo "Missing Dockerfile: GenAIComps/${dockerfile_path} (Referenced in GenAIExamples/${file}:${line})"
fi
done < <(grep -Ern 'docker build .* -f comps/.+/Dockerfile' --include='*.md' .)
if [[ "$miss" == "TRUE" ]]; then
exit 1
fi
shell: bash
check-the-validity-of-hyperlinks-in-README:
runs-on: ubuntu-latest
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout Repo GenAIExamples
uses: actions/checkout@v4
- name: Check the Validity of Hyperlinks
run: |
cd ${{github.workspace}}
fail="FALSE"
url_lines=$(grep -Eo '\]\(http[s]?://[^)]+\)' --include='*.md' -r .)
if [ -n "$url_lines" ]; then
for url_line in $url_lines; do
url=$(echo "$url_line"|cut -d '(' -f2 | cut -d ')' -f1|sed 's/\.git$//')
path=$(echo "$url_line"|cut -d':' -f1 | cut -d'/' -f2-)
response=$(curl -L -s -o /dev/null -w "%{http_code}" "$url")
if [ "$response" -ne 200 ]; then
echo "**********Validation failed, try again**********"
response_retry=$(curl -s -o /dev/null -w "%{http_code}" "$url")
if [ "$response_retry" -eq 200 ]; then
echo "*****Retry successfully*****"
else
echo "Invalid link from ${{github.workspace}}/$path: $url"
fail="TRUE"
fi
fi
done
fi
if [[ "$fail" == "TRUE" ]]; then
exit 1
else
echo "All hyperlinks are valid."
fi
shell: bash
check-the-validity-of-relative-path:
runs-on: ubuntu-latest
steps:
- name: Clean up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout Repo GenAIExamples
uses: actions/checkout@v4
- name: Checking Relative Path Validity
run: |
cd ${{github.workspace}}
fail="FALSE"
repo_name=${{ github.event.pull_request.head.repo.full_name }}
if [ "$(echo "$repo_name"|cut -d'/' -f1)" != "opea-project" ]; then
owner=$(echo "${{ github.event.pull_request.head.repo.full_name }}" |cut -d'/' -f1)
branch="https://github.com/$owner/GenAIExamples/tree/${{ github.event.pull_request.head.ref }}"
else
branch="https://github.com/opea-project/GenAIExamples/blob/${{ github.event.pull_request.head.ref }}"
fi
link_head="https://github.com/opea-project/GenAIExamples/blob/main"
png_lines=$(grep -Eo '\]\([^)]+\)' --include='*.md' -r .|grep -Ev 'http')
if [ -n "$png_lines" ]; then
for png_line in $png_lines; do
refer_path=$(echo "$png_line"|cut -d':' -f1 | cut -d'/' -f2-)
png_path=$(echo "$png_line"|cut -d '(' -f2 | cut -d ')' -f1)
if [[ "${png_path:0:1}" == "/" ]]; then
check_path=${{github.workspace}}$png_path
elif [[ "${png_path:0:1}" == "#" ]]; then
check_path=${{github.workspace}}/$refer_path$png_path
else
check_path=${{github.workspace}}/$(dirname "$refer_path")/$png_path
fi
real_path=$(realpath $check_path)
if [ $? -ne 0 ]; then
echo "Path $png_path in file ${{github.workspace}}/$refer_path does not exist"
fail="TRUE"
else
url=$link_head$(echo "$real_path" | sed 's|.*/GenAIExamples||')
response=$(curl -I -L -s -o /dev/null -w "%{http_code}" "$url")
if [ "$response" -ne 200 ]; then
echo "**********Validation failed, try again**********"
response_retry=$(curl -s -o /dev/null -w "%{http_code}" "$url")
if [ "$response_retry" -eq 200 ]; then
echo "*****Retry successfully*****"
else
echo "Retry failed. Check branch ${{ github.event.pull_request.head.ref }}"
url_dev=$branch$(echo "$real_path" | sed 's|.*/GenAIExamples||')
response=$(curl -I -L -s -o /dev/null -w "%{http_code}" "$url_dev")
if [ "$response" -ne 200 ]; then
echo "**********Validation failed, try again**********"
response_retry=$(curl -s -o /dev/null -w "%{http_code}" "$url_dev")
if [ "$response_retry" -eq 200 ]; then
echo "*****Retry successfully*****"
else
echo "Invalid path from ${{github.workspace}}/$refer_path: $png_path"
fail="TRUE"
fi
else
echo "Check branch ${{ github.event.pull_request.head.ref }} successfully."
fi
fi
fi
fi
done
fi
if [[ "$fail" == "TRUE" ]]; then
exit 1
else
echo "All hyperlinks are valid."
fi
shell: bash

34
.github/workflows/push-image-build.yml vendored Normal file
View File

@@ -0,0 +1,34 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# Test
name: Build latest images on push event
on:
push:
branches: [ 'main' ]
paths:
- "**.py"
- "**Dockerfile"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-on-push
cancel-in-progress: true
jobs:
job1:
uses: ./.github/workflows/_get-test-matrix.yml
with:
test_mode: "docker_image_build/build.yaml"
image-build:
needs: job1
strategy:
matrix:
example: ${{ fromJSON(needs.job1.outputs.run_matrix).include.*.example }}
node: ["gaudi","xeon"]
fail-fast: false
uses: ./.github/workflows/_example-workflow.yml
with:
node: ${{ matrix.node }}
example: ${{ matrix.example }}
secrets: inherit

View File

@@ -0,0 +1,49 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Check the validity of links in docker_images_list.
on:
push:
branches: [main]
types: [opened, reopened, ready_for_review, synchronize]
jobs:
check-dockerfile-paths:
runs-on: ubuntu-latest
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*
- name: Checkout repo GenAIExamples
uses: actions/checkout@v4
- name: Check the validity of links
run: |
cd ${{github.workspace}}
miss="FALSE"
while IFS=: read -r line link; do
http_status=$(curl -o /dev/null -s -w "%{http_code}" "$link")
if [ "$http_status" -eq 200 ]; then
echo "Valid link: $link (Line $line)"
else
echo "Broken link: $link (Line $line) (Status $http_status) "
echo "-----------------retry strat----------------------"
retry_http_status=$(curl -o /dev/null -s -w "%{http_code}" "$link")
if [ "$retry_http_status" -eq 200 ]; then
miss="FALSE"
echo "Valid link: $link (Line $line)"
echo "---------------Retry is valid---------------------"
else
miss="TRUE"
echo "Retry broken link: $link (Line $line) (Status $http_status) "
echo "-------------Retry is not valid-------------------"
fi
fi
done < <(grep -n -oP '(?<=a href=")[^"]*(?=">)' ../../docker_images_list.md)
if [[ "$miss" == "TRUE" ]]; then
exit 1
fi
shell: bash

View File

@@ -0,0 +1,59 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
on:
push:
branches: [ 'main','issue' ]
paths:
- "**/docker_compose/**/compose*.yaml"
name: Create an issue to GenAIInfra on push
jobs:
job1:
name: Create issue
runs-on: ubuntu-latest
steps:
- name: Checkout out Repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: get-changed-files
run: |
set -xe
base_commit=$(git rev-parse HEAD~1)
merged_commit=$(git log -1 --format='%H')
changed_files="$(git diff --name-only ${base_commit} ${merged_commit} | \
grep -E '.*/docker_compose/.*/compose.*.yaml')" || true
examples=$(printf '%s\n' "${changed_files[@]}" | grep '/' | cut -d'/' -f1 | sort -u)
format_examples=$(echo "$examples" | tr '\n' ',')
format_examples=${format_examples%,}
echo "examples=$format_examples" >> $GITHUB_ENV
format_changed_files=$(echo "$changed_files" | awk '{print "- "$0}')
echo "changed_files<<EOF" >> $GITHUB_ENV
echo "$format_changed_files" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Issue
uses: daisy-ycguo/create-issue-action@stable
with:
token: ${{ secrets.Infra_Issue_Token }}
owner: opea-project
repo: GenAIInfra
title: |
[ci-auto] GenAIExample ${{ env.examples }} compose.yaml got changed.
assignees: lianhao
labels: helm
body: |
## GenAIExample ${{ env.examples }} compose.yaml got changed
Below files are changed in [this commit](https://github.com/opea-project/GenAIExamples/commit/${{ github.sha }})
${{ env.changed_files }}
Please verify if the helm charts and manifests need to be changed accordingly.
> This issue was created automatically by CI.

View File

@@ -5,13 +5,25 @@
source /GenAIExamples/.github/workflows/scripts/change_color
log_dir=/GenAIExamples/.github/workflows/scripts/codeScan
ERROR_WARN=false
find . -type f \( -name "Dockerfile*" \) -print -exec hadolint --ignore DL3006 --ignore DL3007 --ignore DL3008 {} \; 2>&1 | tee ${log_dir}/hadolint.log
find . -type f \( -name "Dockerfile*" \) -print -exec hadolint --ignore DL3006 --ignore DL3007 --ignore DL3008 --ignore DL3013 {} \; > ${log_dir}/hadolint.log
if [[ $(grep -c "error" ${log_dir}/hadolint.log) != 0 ]]; then
$BOLD_RED && echo "Error!! Please Click on the artifact button to download and check error details." && $RESET
exit 1
echo $(grep "error" ${log_dir}/hadolint.log)
ERROR_WARN=true
fi
if [[ $(grep -c "warning" ${log_dir}/hadolint.log) != 0 ]]; then
$BOLD_RED && echo "Warning!! Please Click on the artifact button to download and check warning details." && $RESET
echo $(grep "warning" ${log_dir}/hadolint.log)
ERROR_WARN=true
fi
if [ "$ERROR_WARN" = true ]; then
echo $ERROR_WARN
exit 1
fi
$BOLD_PURPLE && echo "Congratulations, Hadolint check passed!" && $LIGHT_PURPLE && echo " You can click on the artifact button to see the log details." && $RESET
exit 0

View File

@@ -0,0 +1,37 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
# example: 'ChatQnA', 'CodeGen', ...
# hardware: 'xeon', 'gaudi', ...
set -e
changed_files=$changed_files
test_mode=$test_mode
run_matrix="{\"include\":["
hardware_list="xeon gaudi" # current support hardware list
examples=$(printf '%s\n' "${changed_files[@]}" | grep '/' | cut -d'/' -f1 | sort -u)
for example in ${examples}; do
cd $WORKSPACE/$example
if [[ ! $(find . -type f | grep ${test_mode}) ]]; then continue; fi
run_hardware=""
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | cut -d'/' -f2 | grep -E '*.py|Dockerfile*|ui|docker_image_build' ) ]]; then
# run test on all hardware if megaservice or ui code change
run_hardware=$hardware_list
else
for hardware in ${hardware_list}; do
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | grep -c ${hardware}) != 0 ]]; then
run_hardware="${hardware} ${run_hardware}"
fi
done
fi
for hw in ${run_hardware}; do
run_matrix="${run_matrix}{\"example\":\"${example}\",\"hardware\":\"${hw}\"},"
done
done
run_matrix=$run_matrix"]}"
echo "run_matrix=${run_matrix}"
echo "run_matrix=${run_matrix}" >> $GITHUB_OUTPUT

71
.github/workflows/scripts/k8s-utils.sh vendored Executable file
View File

@@ -0,0 +1,71 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#set -xe
function dump_pod_log() {
pod_name=$1
namespace=$2
echo "-----------Pod: $pod_name---------"
echo "#kubectl describe pod $pod_name -n $namespace"
kubectl describe pod $pod_name -n $namespace
echo "-----------------------------------"
echo "#kubectl logs $pod_name -n $namespace"
kubectl logs $pod_name -n $namespace
echo "-----------------------------------"
}
function dump_pods_status() {
namespace=$1
echo "-----DUMP POD STATUS in NS $namespace------"
kubectl get pods -n $namespace -o wide
echo "-----------------------------------"
# Get all pods in the namespace and their statuses
pods=$(kubectl get pods -n $namespace --no-headers)
# Loop through each pod
echo "$pods" | while read -r line; do
pod_name=$(echo $line | awk '{print $1}')
ready=$(echo $line | awk '{print $2}')
status=$(echo $line | awk '{print $3}')
# Extract the READY count
ready_count=$(echo $ready | cut -d'/' -f1)
required_count=$(echo $ready | cut -d'/' -f2)
# Check if the pod is not in "Running" status or READY count is less than required
if [[ "$status" != "Running" || "$ready_count" -lt "$required_count" ]]; then
dump_pod_log $pod_name $namespace
fi
done
}
function dump_all_pod_logs() {
namespace=$1
echo "-----DUMP POD STATUS AND LOG in NS $namespace------"
pods=$(kubectl get pods -n $namespace -o jsonpath='{.items[*].metadata.name}')
for pod_name in $pods
do
dump_pod_log $pod_name $namespace
done
}
if [ $# -eq 0 ]; then
echo "Usage: $0 <function_name>"
exit 1
fi
case "$1" in
dump_pods_status)
dump_pods_status $2
;;
dump_all_pod_logs)
dump_all_pod_logs $2
;;
*)
echo "Unknown function: $1"
;;
esac

View File

@@ -0,0 +1,44 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
declare -A dict
dict["ghcr.io/huggingface/text-generation-inference"]="docker://ghcr.io/huggingface/text-generation-inference:latest-intel-cpu"
function get_latest_version() {
repo_image=$1
if [[ $repo_image == *"huggingface"* ]]; then
revision=$(skopeo inspect --config ${dict[$repo_image]} | jq -r '.config.Labels["org.opencontainers.image.revision"][:7]')
latest_version="sha-$revision-intel-cpu"
else
versions=$(skopeo list-tags ${dict[$repo_image]} | jq -r '.Tags[]')
printf "version list:\n$versions\n"
latest_version=$(printf "%s\n" "${versions[@]}" | grep -E '^[\.0-9\-]+$' | sort -V | tail -n 1)
fi
echo "latest version: $latest_version"
replace_image_version $repo_image $latest_version
}
function replace_image_version() {
repo_image=$1
version=$2
if [[ -z "$version" ]]; then
echo "version is empty"
else
echo "replace $repo_image:tag with $repo_image:$version"
find . -name "Dockerfile" | xargs sed -i "s|$repo_image:sha[A-Za-z0-9\-]*|$repo_image:$version|g"
find . -name "*.yaml" | xargs sed -i "s|$repo_image:sha[A-Za-z0-9\-]*|$repo_image:$version|g"
find . -name "*.md" | xargs sed -i "s|$repo_image:sha[A-Za-z0-9\-]*|$repo_image:$version|g"
fi
}
function main() {
for repo_image in "${!dict[@]}"; do
echo "::group::check $repo_image"
get_latest_version $repo_image
echo "::endgroup::"
done
}
main

View File

@@ -0,0 +1,54 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
name: Weekly update base images and 3rd party images
on:
schedule:
- cron: "0 0 * * 0"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
freeze-images:
runs-on: ubuntu-latest
env:
USER_NAME: "NeuralChatBot"
USER_EMAIL: "grp_neural_chat_bot@intel.com"
BRANCH_NAME: "update_images_tag"
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: "main"
- name: Install skopeo
run: |
sudo apt update
sudo apt -y install skopeo
- name: Set up Git
run: |
git config --global user.name ${{ env.USER_NAME }}
git config --global user.email ${{ env.USER_EMAIL }}
git remote set-url origin https://${{ env.USER_NAME }}:"${{ secrets.ACTION_TOKEN }}"@github.com/opea-project/GenAIExamples.git
git checkout -b ${{ env.BRANCH_NAME }}
- name: Run script
run: |
bash .github/workflows/scripts/update_images_tag.sh
- name: Commit changes
run: |
git add .
git commit -s -m "Update third party images tag"
git push --set-upstream origin update_images_tag
- name: create pull request
run: gh pr create -B main -H ${{ env.BRANCH_NAME }} --title 'Update ghcr.io/huggingface/text-generation-inference image tag' --body 'Created by Github action'
env:
GH_TOKEN: ${{ secrets.ACTION_TOKEN }}

View File

@@ -7,23 +7,23 @@ ci:
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: end-of-file-fixer
files: (.*\.(py|md|rst|yaml|yml|json|ts|js|html|svelte|sh))$
- id: check-json
exclude: |
(?x)^(
ChatQnA/docker/ui/svelte/tsconfig.json|
ChatQnA/ui/svelte/tsconfig.json|
SearchQnA/ui/svelte/tsconfig.json|
DocSum/docker/ui/svelte/tsconfig.json
DocSum/ui/svelte/tsconfig.json
)$
- id: check-yaml
args: [--allow-multiple-documents]
- id: debug-statements
- id: requirements-txt-fixer
- id: trailing-whitespace
files: (.*\.(py|rst|cmake|yaml|yml|json|ts|js|html|svelte|sh))$
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
@@ -100,21 +100,21 @@ repos:
- prettier@3.2.5
- repo: https://github.com/psf/black.git
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black
files: (.*\.py)$
- repo: https://github.com/asottile/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
args: [--line-length=120, --skip-errors]
additional_dependencies:
- black==24.3.0
- black==24.4.2
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
rev: v2.3.0
hooks:
- id: codespell
args: [-w]
@@ -122,7 +122,7 @@ repos:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]

106
AgentQnA/README.md Normal file
View File

@@ -0,0 +1,106 @@
# Agents for Question Answering
## Overview
This example showcases a hierarchical multi-agent system for question-answering applications. The architecture diagram is shown below. The supervisor agent interfaces with the user and dispatch tasks to the worker agent and other tools to gather information and come up with answers. The worker agent uses the retrieval tool to generate answers to the queries posted by the supervisor agent. Other tools used by the supervisor agent may include APIs to interface knowledge graphs, SQL databases, external knowledge bases, etc.
![Architecture Overview](assets/agent_qna_arch.png)
### Why Agent for question answering?
1. Improve relevancy of retrieved context.
Agent can rephrase user queries, decompose user queries, and iterate to get the most relevant context for answering user's questions. Compared to conventional RAG, RAG agent can significantly improve the correctness and relevancy of the answer.
2. Use tools to get additional knowledge.
For example, knowledge graphs and SQL databases can be exposed as APIs for Agents to gather knowledge that may be missing in the retrieval vector database.
3. Hierarchical agent can further improve performance.
Expert worker agents, such as retrieval agent, knowledge graph agent, SQL agent, etc., can provide high-quality output for different aspects of a complex query, and the supervisor agent can aggregate the information together to provide a comprehensive answer.
### Roadmap
- v0.9: Worker agent uses open-source websearch tool (duckduckgo), agents use OpenAI GPT-4o-mini as llm backend.
- v1.0: Worker agent uses OPEA retrieval megaservice as tool.
- v1.0 or later: agents use open-source llm backend.
- v1.1 or later: add safeguards
## Getting started
1. Build agent docker image </br>
First, clone the opea GenAIComps repo
```
export WORKDIR=<your-work-directory>
cd $WORKDIR
git clone https://github.com/opea-project/GenAIComps.git
```
Then build the agent docker image. Both the supervisor agent and the worker agent will use the same docker image, but when we launch the two agents we will specify different strategies and register different tools.
```
cd GenAIComps
docker build -t opea/agent-langchain:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/agent/langchain/Dockerfile .
```
2. Launch tool services </br>
In this example, we will use some of the mock APIs provided in the Meta CRAG KDD Challenge to demonstrate the benefits of gaining additional context from mock knowledge graphs.
```
docker run -d -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
```
3. Set up environment for this example </br>
First, clone this repo
```
cd $WORKDIR
git clone https://github.com/opea-project/GenAIExamples.git
```
Second, set up env vars
```
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
# optional: OPANAI_API_KEY
export OPENAI_API_KEY=<your-openai-key>
```
4. Launch agent services</br>
The configurations of the supervisor agent and the worker agent are defined in the docker-compose yaml file. We currently use openAI GPT-4o-mini as LLM, and we plan to add support for llama3.1-70B-instruct (served by TGI-Gaudi) in a subsequent release.
To use openai llm, run command below.
```
cd docker_compose/intel/cpu/xeon
bash launch_agent_service_openai.sh
```
## Validate services
First look at logs of the agent docker containers:
```
docker logs docgrader-agent-endpoint
```
```
docker logs react-agent-endpoint
```
You should see something like "HTTP server setup successful" if the docker containers are started successfully.</p>
Second, validate worker agent:
```
curl http://${ip_address}:9095/v1/chat/completions -X POST -H "Content-Type: application/json" -d '{
"query": "Most recent album by Taylor Swift"
}'
```
Third, validate supervisor agent:
```
curl http://${ip_address}:9090/v1/chat/completions -X POST -H "Content-Type: application/json" -d '{
"query": "Most recent album by Taylor Swift"
}'
```
## How to register your own tools with agent
You can take a look at the tools yaml and python files in this example. For more details, please refer to the "Provide your own tools" section in the instructions [here](https://github.com/opea-project/GenAIComps/tree/main/comps/agent/langchain/README.md#5-customize-agent-strategy).

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -0,0 +1,65 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
worker-docgrader-agent:
image: opea/agent-langchain:latest
container_name: docgrader-agent-endpoint
volumes:
- ${WORKDIR}/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/
- ${TOOLSET_PATH}:/home/user/tools/
ports:
- "9095:9095"
ipc: host
environment:
ip_address: ${ip_address}
strategy: rag_agent
recursion_limit: ${recursion_limit_worker}
llm_engine: openai
OPENAI_API_KEY: ${OPENAI_API_KEY}
model: ${model}
temperature: ${temperature}
max_new_tokens: ${max_new_tokens}
streaming: false
tools: /home/user/tools/worker_agent_tools.yaml
require_human_feedback: false
RETRIEVAL_TOOL_URL: ${RETRIEVAL_TOOL_URL}
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-worker-agent-service"
port: 9095
supervisor-react-agent:
image: opea/agent-langchain:latest
container_name: react-agent-endpoint
volumes:
- ${WORKDIR}/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/
- ${TOOLSET_PATH}:/home/user/tools/
ports:
- "9090:9090"
ipc: host
environment:
ip_address: ${ip_address}
strategy: react_langgraph
recursion_limit: ${recursion_limit_supervisor}
llm_engine: openai
OPENAI_API_KEY: ${OPENAI_API_KEY}
model: ${model}
temperature: ${temperature}
max_new_tokens: ${max_new_tokens}
streaming: false
tools: /home/user/tools/supervisor_agent_tools.yaml
require_human_feedback: false
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-supervisor-agent-service"
CRAG_SERVER: $CRAG_SERVER
WORKER_AGENT_URL: $WORKER_AGENT_URL
port: 9090

View File

@@ -0,0 +1,16 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
export ip_address=$(hostname -I | awk '{print $1}')
export recursion_limit_worker=12
export recursion_limit_supervisor=10
export model="gpt-4o-mini-2024-07-18"
export temperature=0
export max_new_tokens=512
export OPENAI_API_KEY=${OPENAI_API_KEY}
export WORKER_AGENT_URL="http://${ip_address}:9095/v1/chat/completions"
export RETRIEVAL_TOOL_URL="http://${ip_address}:8889/v1/retrievaltool"
export CRAG_SERVER=http://${ip_address}:8080
docker compose -f compose_openai.yaml up -d

View File

@@ -0,0 +1,98 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
tgi-server:
image: ghcr.io/huggingface/tgi-gaudi:2.0.5
container_name: tgi-server
ports:
- "8085:80"
volumes:
- ${HF_CACHE_DIR}:/data
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
HF_HUB_DISABLE_PROGRESS_BARS: 1
HF_HUB_ENABLE_HF_TRANSFER: 0
HABANA_VISIBLE_DEVICES: all
OMPI_MCA_btl_vader_single_copy_mechanism: none
PT_HPU_ENABLE_LAZY_COLLECTIVES: true
ENABLE_HPU_GRAPH: true
LIMIT_HPU_GRAPH: true
USE_FLASH_ATTENTION: true
FLASH_ATTENTION_RECOMPUTE: true
runtime: habana
cap_add:
- SYS_NICE
ipc: host
command: --model-id ${LLM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 --sharded true --num-shard ${NUM_SHARDS}
worker-docgrader-agent:
image: opea/agent-langchain:latest
container_name: docgrader-agent-endpoint
depends_on:
- tgi-server
volumes:
# - ${WORKDIR}/GenAIExamples/AgentQnA/docker_image_build/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/
- ${TOOLSET_PATH}:/home/user/tools/
ports:
- "9095:9095"
ipc: host
environment:
ip_address: ${ip_address}
strategy: rag_agent
recursion_limit: ${recursion_limit_worker}
llm_engine: tgi
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
llm_endpoint_url: ${LLM_ENDPOINT_URL}
model: ${LLM_MODEL_ID}
temperature: ${temperature}
max_new_tokens: ${max_new_tokens}
streaming: false
tools: /home/user/tools/worker_agent_tools.yaml
require_human_feedback: false
RETRIEVAL_TOOL_URL: ${RETRIEVAL_TOOL_URL}
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-worker-agent-service"
port: 9095
supervisor-react-agent:
image: opea/agent-langchain:latest
container_name: react-agent-endpoint
depends_on:
- tgi-server
- worker-docgrader-agent
volumes:
# - ${WORKDIR}/GenAIExamples/AgentQnA/docker_image_build/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/
- ${TOOLSET_PATH}:/home/user/tools/
ports:
- "9090:9090"
ipc: host
environment:
ip_address: ${ip_address}
strategy: react_langgraph
recursion_limit: ${recursion_limit_supervisor}
llm_engine: tgi
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
llm_endpoint_url: ${LLM_ENDPOINT_URL}
model: ${LLM_MODEL_ID}
temperature: ${temperature}
max_new_tokens: ${max_new_tokens}
streaming: false
tools: /home/user/tools/supervisor_agent_tools.yaml
require_human_feedback: false
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
LANGCHAIN_API_KEY: ${LANGCHAIN_API_KEY}
LANGCHAIN_TRACING_V2: ${LANGCHAIN_TRACING_V2}
LANGCHAIN_PROJECT: "opea-supervisor-agent-service"
CRAG_SERVER: $CRAG_SERVER
WORKER_AGENT_URL: $WORKER_AGENT_URL
port: 9090

View File

@@ -0,0 +1,43 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
WORKPATH=$(dirname "$PWD")/..
# export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
# LLM related environment variables
export HF_CACHE_DIR=${HF_CACHE_DIR}
ls $HF_CACHE_DIR
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export LLM_MODEL_ID="meta-llama/Meta-Llama-3.1-70B-Instruct"
export NUM_SHARDS=4
export LLM_ENDPOINT_URL="http://${ip_address}:8085"
export temperature=0.01
export max_new_tokens=512
# agent related environment variables
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
echo "TOOLSET_PATH=${TOOLSET_PATH}"
export recursion_limit_worker=12
export recursion_limit_supervisor=10
export WORKER_AGENT_URL="http://${ip_address}:9095/v1/chat/completions"
export RETRIEVAL_TOOL_URL="http://${ip_address}:8889/v1/retrievaltool"
export CRAG_SERVER=http://${ip_address}:8080
docker compose -f compose.yaml up -d
sleep 5s
echo "Waiting tgi gaudi ready"
n=0
until [[ "$n" -ge 100 ]] || [[ $ready == true ]]; do
docker logs tgi-server &> tgi-gaudi-service.log
n=$((n+1))
if grep -q Connected tgi-gaudi-service.log; then
break
fi
sleep 5s
done
sleep 5s
echo "Service started successfully"

View File

@@ -0,0 +1,13 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
agent-langchain:
build:
context: GenAIComps
dockerfile: comps/agent/langchain/Dockerfile
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
image: ${REGISTRY:-opea}/agent-langchain:${TAG:-latest}

View File

@@ -0,0 +1,27 @@
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Thriller (song) - Wikipedia\nJump to content\nMain menu\nMain menu\nmove to sidebar\nhide\nNavigation\nMain pageContentsCurrent eventsRandom articleAbout WikipediaContact usDonate\nContribute\nHelpLearn to editCommunity portalRecent changesUpload file\nSearch\nSearch\nCreate account\nLog in\nPersonal tools\nCreate account Log in\nPages for logged out editors learn more\nContributionsTalk\nContents\nmove to sidebar\nhide\n(Top)\n1Composition\n2Writing\n3Recording\n4Release\n5Music video\n6Chart performance\n7Critical reception\n8Personnel\n9Charts\nToggle Charts subsection\n9.1Weekly charts\n9.2Year-end charts\n10Certifications\n11See also\n12References\nToggle the table of contents\nThriller (song)\n33 languages\n\u0627\u0644\u0639\u0631\u0628\u064a\u0629Az\u0259rbaycancaDanskDeutsch\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03acEspa\u00f1ol\u0641\u0627\u0631\u0633\u06ccFran\u00e7aisGalego\ud55c\uad6d\uc5b4HrvatskiItaliano\u05e2\u05d1\u05e8\u05d9\u05ea\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8KiswahiliMagyar\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02Nederlands\u65e5\u672c\u8a9eNorsk bokm\u00e5lPolskiPortugu\u00eas\u0420\u0443\u0441\u0441\u043a\u0438\u0439ShqipSimple English\u0421\u0440\u043f\u0441\u043a\u0438 / srpskiSuomiSvenska\u0ba4\u0bae\u0bbf\u0bb4\u0bcd\u0e44\u0e17\u0e22T\u00fcrk\u00e7e\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430Ti\u1ebfng Vi\u1ec7t\nEdit links\nArticleTalk\nEnglish\nReadEditView history\nTools\nTools\nmove to sidebar\nhide\nActions\nReadEditView history\nGeneral\nWhat links hereRelated changesUpload fileSpecial pagesPermanent linkPage informationCite this pageGet shortened URLDownload QR codeWikidata item\nPrint/export\nDownload as PDFPrintable version\nFrom Wikipedia, the free encyclopedia\n1983 single by Michael Jackson\nFor other songs, see Thriller (disambiguation) \u00a7\u00a0Music.\n\"Thriller\"US 12-inch singleSingle by Michael Jacksonfrom the album\nThriller B-side\"Things I Do for You\"Released\nNovember\u00a01983\u00a0(1983-11) (UK)[1]\nJanuary\u00a023,\u00a01984\u00a0(1984-01-23) (US)[2]\nRecorded1982StudioWestlake (Los Angeles, California)Genre\nDisco\nfunk\nLength\n5:57 (album version)\n4:37 (special edit)\n4:05 (remixed short version)\n5:04 (\"Starlight\" version)\nLabelEpicSongwriter(s)Rod TempertonProducer(s)Quincy JonesMichael Jackson singles chronology\n\"Say Say Say\" (1983)\n\"Thriller\" (1983)\n\"Farewell My Summer Love\" (1984)\nMusic video\"Thriller\" on YouTube"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Recorded1982StudioWestlake (Los Angeles, California)Genre\nDisco\nfunk\nLength\n5:57 (album version)\n4:37 (special edit)\n4:05 (remixed short version)\n5:04 (\"Starlight\" version)\nLabelEpicSongwriter(s)Rod TempertonProducer(s)Quincy JonesMichael Jackson singles chronology\n\"Say Say Say\" (1983)\n\"Thriller\" (1983)\n\"Farewell My Summer Love\" (1984)\nMusic video\"Thriller\" on YouTube\n\"Thriller\" is a song by the American singer Michael Jackson. It was released by Epic Records in November 1983 in the UK and on January 23, 1984, in the US, as the seventh and final single from his sixth studio album, Thriller.[3]\n\"Thriller\" is a funk song featuring a repeating synthesizer bassline and lyrics and sound effects evoking horror films. It ends with a spoken-word sequence performed by the horror actor Vincent Price. It was produced by Quincy Jones and written by Rod Temperton, who wanted to write a theatrical song to suit Jackson's love of film.\nJackson decided to release \"Thriller\" as a single after Thriller left the top of the Billboard 200 chart. The\n\"Thriller\" music video, directed by John Landis, has Jackson dancing with a horde of zombies. It has been named the greatest music video of all time by various publications and readers' polls, and doubled sales of Thriller, helping it become the best-selling album in history."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Jackson decided to release \"Thriller\" as a single after Thriller left the top of the Billboard 200 chart. The\n\"Thriller\" music video, directed by John Landis, has Jackson dancing with a horde of zombies. It has been named the greatest music video of all time by various publications and readers' polls, and doubled sales of Thriller, helping it become the best-selling album in history.\nIt was the album's seventh top-ten single on the Billboard Hot 100, reaching number four. It reached number one in Belgium, France and Spain, and the top ten in many other countries. In the week of Jackson's death in 2009, it was Jackson's bestselling track in the US, with sales of 167,000 copies on the Billboard Hot Digital Tracks chart. It entered the Billboard Hot Digital Singles Chart at number two, and remained in the charts' top ten for three consecutive weeks. \"Thriller\" is certified Diamond by the Recording Industry Association of America. It appears on several of Jackson's greatest-hits albums and has been covered by numerous artists. The song has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween.\nComposition[edit]\n\"Thriller\"\nJackson's song \"Thriller\", released as a single in 1984; Nelson George wrote that it uses cinematic sound effects, horror film motifs, and vocal trickery to convey a sense of danger.[4]\nProblems playing this file? See media help.\n\"Thriller\" is a disco-funk song[5] The introduction features sound effects such as a creaking door, thunder, feet walking on wooden planks, winds and howling wolves.[6]\nWriting[edit]\nHorror actor Vincent Price provided the spoken-word sequence at the end of \"Thriller\"."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Problems playing this file? See media help.\n\"Thriller\" is a disco-funk song[5] The introduction features sound effects such as a creaking door, thunder, feet walking on wooden planks, winds and howling wolves.[6]\nWriting[edit]\nHorror actor Vincent Price provided the spoken-word sequence at the end of \"Thriller\".\n\"Thriller\" was written by the English songwriter Rod Temperton, who had previously written \"Rock with You\" and \"Off the Wall\" for Jackson's 1979 album Off the Wall.[7] Temperton wanted to write something theatrical to suit Jackson's love of film.[8] He improvised with bass and drum patterns until he developed the bassline that runs through the song, then wrote a chord progression that built to a climax.[8] He recalled: \"I wanted it to build and build \u2013 a bit like stretching an elastic band throughout the tune to heighten suspense.\"[8]\nTemperton's first version was titled \"Starlight\", with the chorus lyric: \"Give me some starlight / Starlight sun\".[9] The production team, led by Quincy Jones, felt the song should be the title track, but that \"Starlight\" was not a strong album title. Instead, they wanted something \"mysterious\" to match Jackson's \"evolving persona\".[8] Temperton considered several titles, including \"Midnight Man\", which Jones felt was \"going in the right direction\". Finally, he conceived \"Thriller\", but worried that it was \"a crap word to sing ... It sounded terrible! However, we got Michael to spit it into the microphone a few times and it worked.\"[8]\nWith the title decided, Temperton wrote lyrics within \"a couple of hours\".[8] He envisioned a spoken-word sequence for the ending, but did not know what form it should take. It was decided to have a famous voice from the horror genre perform it, and Jones' then-wife, Peggy Lipton, suggested her friend Vincent Price.[6] Temperton composed the words for Price's part in a taxi on the way to the studio on the day of recording.[6]\nRecording[edit]\nQuincy Jones produced \"Thriller\"."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Recording[edit]\nQuincy Jones produced \"Thriller\".\nAlong with the rest of the album, \"Thriller\" was recorded over eight weeks in 1982.[10] It was recorded at Westlake Recording Studios on Santa Monica Boulevard in Los Angeles, California.[6] The engineer Bruce Swedien had Jackson record his vocals in different approaches, doubling takes and recording at different distances from the microphone. Some background vocals were recorded in the Westlake shower stall.[6]\nThe bassline was performed on an ARP 2600 synthesizer, and the verse pads were performed on a Roland Jupiter-8 layered with a Sequential Circuits Prophet 5 and a Yamaha CS-80.[11] The percussion was created with a LinnDrum drum machine modified with sound chips from two other drum machines: a snare hi-hat and congas from an LM-1 and a clap from a TR-808. \"Thriller\" also features Rhodes piano performed by Greg Phillinganes and guitar performed by David Williams.[12]\nTo record the wolf howls, Swedien set up tape recorders up around his Great Dane in a barn overnight, but the dog never howled. Instead, Jackson recorded the howls himself.[13] For the creaking doors, Swedien rented doors designed for sound effects from the Universal Studios Lot and recorded the hinges.[13] Price recorded his part in two takes; Jones, acknowledging that doing a voice-over for a song is difficult, praised Price and described his takes as \"fabulous\".[6]\nRelease[edit]\nThe album Thriller was released in November 1982 on Epic Records and spent months at the top of the Billboard 200.[14] \"Thriller\" was not initially planned for release as a single, as Epic saw it as a novelty song.[15] The Epic executive Walter Yetnikoff asked: \"Who wants a single about monsters?\"[14]"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Release[edit]\nThe album Thriller was released in November 1982 on Epic Records and spent months at the top of the Billboard 200.[14] \"Thriller\" was not initially planned for release as a single, as Epic saw it as a novelty song.[15] The Epic executive Walter Yetnikoff asked: \"Who wants a single about monsters?\"[14]\nBy mid-1983, sales of the album had begun to decline. Jackson, who was \"obsessive\" about his sales figures,[14] urged Yetnikoff and another Epic executive, Larry Stessel, to help conceive a plan to return the album to the top of the charts. Jackson's manager Frank DiLeo suggested releasing \"Thriller\", backed by a new music video.[14][16] It was the final single from the album, released in January 1984.[15]\nAlternative versions of \"Thriller\", including the \"Starlight\" demo, were released on the anniversary reissue Thriller 40 (2022).[17]\nMusic video[edit]\nMain article: Michael Jackson's Thriller (music video)\nThe music video for \"Thriller\" references numerous horror films,[14] and stars Jackson performing a dance routine with a horde of the undead.[14] It was directed by the horror director John Landis and written by Landis and Jackson. Jackson contacted Landis after seeing his film An American Werewolf in London. The pair conceived a 13-minute short film with a budget much larger than previous music videos. Jackson's record company refused to finance it, believing Thriller had peaked, so a making-of documentary, Making Michael Jackson's Thriller, was produced to receive financing from television networks.[14]\nMichael Jackson's Thriller premiered on MTV on December 2, 1983.[18] It was launched to great anticipation and played regularly on MTV.[18]\nIt doubled sales of Thriller, and the documentary sold over a million copies, becoming the best-selling videotape at the time.[14] It is credited for transforming music videos into a serious art form, breaking down racial barriers in popular entertainment, and popularizing the making-of documentary format.[19]"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "It doubled sales of Thriller, and the documentary sold over a million copies, becoming the best-selling videotape at the time.[14] It is credited for transforming music videos into a serious art form, breaking down racial barriers in popular entertainment, and popularizing the making-of documentary format.[19]\nMany elements have had a lasting impact on popular culture, such as the zombie dance and Jackson's red jacket, designed by Landis' wife Deborah Nadoolman.[19] Fans worldwide re-enact its zombie dance and it remains popular on YouTube. The Library of Congress described it as \"the most famous music video of all time\". In 2009, it became the first music video inducted into the National Film Registry as \"culturally, historically or aesthetically\" significant.[14]\nChart performance[edit]\n\"Thriller\" entered the Billboard Hot 100 charts at number 20.[20] It reached number seven the following week,[21] number five the next, and peaked the next week at number four, where it stayed for two weeks.[22][23] It finished as the #78 single on Billboard's Hot 100 for the 1984.[24]\n\"Thriller\" charted at number 19 on the Hot R&B/Hip-Hop Songs Chart.[25] On March 10, 1984, it reached its peak at number 3.[26] \"Thriller\" debuted on the UK Singles Chart on November 19, 1983, at number 24, and the following week peaked at number ten; it appeared on the chart for 52 weeks.[27] Beginning on February 5, 1984, \"Thriller\" peaked on the French Singles Chart at number one and topped the chart for four consecutive weeks.[28] \"Thriller\" also topped the Belgian VRT Top 30 Chart for two weeks in January 1984.[29]"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Following Jackson's death in 2009, his music surged in popularity.[30] In the week of his death, \"Thriller\" was Jackson's best-selling track in the US, with sales of 167,000 copies on the Billboard Hot Digital Singles Chart.[30] On July 11, 2009, \"Thriller\" charted on the Billboard Hot Digital Singles Chart at number two (its peak), and the song remained in the charts' top ten for three consecutive weeks.[31] In the United Kingdom, the song charted at number 23 the week of Jackson's death.[32] The following week, the song reached its peak at number 12 on the UK Single Chart.[27] On July 12, 2009, \"Thriller\" peaked at number two on the Italian Singles Chart[33] and was later certified gold by the Federation of the Italian Music Industry.[34] \"Thriller\" reached at number three on the Australian ARIA Chart and Swiss Singles Chart and topped the Spanish Singles Charts for one week.[35] The song also placed within the top ten on the German Singles Chart, Norwegian Singles Chart and Irish Singles Chart, at number nine, number seven and number eight respectively.[35] \"Thriller\" also landed at number 25 on the Danish Singles Chart.[36] In the third week of July \"Thriller\" peaked at number 11 in Finland.[37]\n\"Thriller\"\nhas returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. It re-entered the Billboard Hot 100 in October 2013 at number 42,[38] number 31 in November 2018,[39] and number 19 in November 2021, its highest placement since 1984.[40] This gave Jackson at least one top-20 hit across seven consecutive decades from 1969 on the Billboard Hot 100.[40]"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "\"Thriller\"\nhas returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. It re-entered the Billboard Hot 100 in October 2013 at number 42,[38] number 31 in November 2018,[39] and number 19 in November 2021, its highest placement since 1984.[40] This gave Jackson at least one top-20 hit across seven consecutive decades from 1969 on the Billboard Hot 100.[40]\n\"Thriller\" was certified platinum by the Recording Industry Association of America on December 4, 1989, for sales of over one million physical units in the US[41][42] As of August 2016, the song had sold 4,024,398 copies in the US.[43] The song was later certified Diamond by RIAA for sales over 10 million equivalent-units.[44][45] \"Thriller\" reached number one on three different Billboard charts the week of November 8, 2023, more than a decade after Jackson's death. Those charts included: R&B/Hip-Hop Streaming Songs, R&B Streaming Songs and R&B Digital Song Sales charts.[46]\nCritical reception[edit]\nAshley Lasimone, of AOL's Spinner.com, noted that it \"became a signature for Jackson\" and described \"the groove of its bassline, paired with Michael's killer vocals and sleek moves\" as having \"produced a frighteningly great single.\"[47] Jon Pareles of The New York Times noted that \"'Billie Jean', 'Beat It', 'Wanna Be Startin' Somethin' ' and \"the movie in the song 'Thriller'\", were the songs, unlike the \"fluff\" \"P.Y.T.\", that were \"the hits that made Thriller a world-beater; along with Mr. Jackson's stage and video presence, listeners must have identified with his willingness to admit terror.\"[48] Ann Powers of the Los Angeles Times described \"Thriller\" as \"adequately groovy\" with a \"funked-out beat\" and lyrics \"seemingly lifted from some little kid's 'scary storybook'\".[49][50]\nPersonnel[edit]\nWritten and composed by Rod Temperton\nProduced by Quincy Jones\nMichael Jackson: lead and background vocals, LinnDrum drum machine\nRod Temperton and Brian Banks: synthesizers"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Personnel[edit]\nWritten and composed by Rod Temperton\nProduced by Quincy Jones\nMichael Jackson: lead and background vocals, LinnDrum drum machine\nRod Temperton and Brian Banks: synthesizers\nGreg Phillinganes: synthesizers, Rhodes piano\nAnthony Marinelli: synthesizer programming\nDavid Williams: guitar\nJerry Hey, Gary Grant: trumpets, flugelhorns\nLarry Williams: saxophone, flute\nBill Reichenbach: trombone\nVocal, rhythm and synthesizer arrangement by Rod Temperton\nHorn arrangement by Jerry Hey\nEffects by Bruce Cannon and Bruce Swedien\nFeaturing: Narration by Vincent Price (Not featured on original edited single version)\nCharts[edit]\nWeekly charts[edit]\nChart (1983\u20131985)\nPeakposition\nAustralia (Kent Music Report)[51]\n4\nBelgium (Ultratop 50 Flanders)[52]\n1\nCanadian RPM Top Singles[53]\n3\nFinland (Suomen virallinen singlelista)[54]\n7\nFinland Jukebox (Suomen virallinen singlelista)[54]\n3\nFrance (SNEP)[28]\n1\nIreland (IRMA)[55]\n4\nNetherlands (Dutch Top 40)[56]\n3\nNetherlands (Single Top 100)[57]\n4\nNew Zealand (Recorded Music NZ)[58]\n6\nPortugal (AFP)[59]\n1\nSouth Africa (Springbok)[60]\n26\nSpain (AFYVE)[61]\n1\nUK Singles (OCC)[27]\n10\nUS Cashbox[62]\n4\nUS Billboard Hot 100[63]\n4\nUS Billboard Hot Black Singles[64][26]\n3\nUS Billboard Adult Contemporary[65]\n24\nUS Billboard Album Rock Tracks[64][26]\n42\nUS Radio & Records CHR/Pop Airplay Chart[66]\n1\nWest Germany (Official German Charts)[67]\n9\nChart (2006)\nPeakposition\nFrance (SNEP)[68]\n35\nGermany (Media Control Charts)[35]\n9\nIreland (IRMA)[55]\n8\nItaly (FIMI)[69]\n5\nNetherlands (Single Top 100)[57]\n34\nSpain (PROMUSICAE)[35]\n1\nSwitzerland (Schweizer Hitparade)[35]\n3\nChart (2007)\nPeakposition\nSpain (PROMUSICAE)[70]\n20\nUK Singles (OCC)[27]\n57\nChart (2008)\nPeakposition\nAustria (\u00d63 Austria Top 40)[71]\n55\nNorway (VG-lista)[72]\n13\nSwitzerland (Schweizer Hitparade)[73]\n53\nUK Singles (OCC)[27]\n35\nChart (2009)\nPeakposition\nAustralia (ARIA)[74]\n3\nAustria (\u00d63 Austria Top 40)[71]\n5\nBelgium (Ultratop 50 Back Catalogue Singles Flanders)[75]\n3"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "3\nChart (2007)\nPeakposition\nSpain (PROMUSICAE)[70]\n20\nUK Singles (OCC)[27]\n57\nChart (2008)\nPeakposition\nAustria (\u00d63 Austria Top 40)[71]\n55\nNorway (VG-lista)[72]\n13\nSwitzerland (Schweizer Hitparade)[73]\n53\nUK Singles (OCC)[27]\n35\nChart (2009)\nPeakposition\nAustralia (ARIA)[74]\n3\nAustria (\u00d63 Austria Top 40)[71]\n5\nBelgium (Ultratop 50 Back Catalogue Singles Flanders)[75]\n3\nBelgium (Ultratop 30 Back Catalogue Singles Wallonia)[76]\n2\nDenmark (Tracklisten)[36]\n25\nEurope (European Hot 100 Singles)[77]\n16\nFinland (Suomen virallinen lista)[78]\n11\nFrance (SNEP)[79]\n3\nIreland (IRMA)[35]\n8\nItaly (FIMI)[69]\n2\nJapan Singles Top 100 (Oricon)[35]\n41\nNetherlands (Single Top 100)[57]\n9\nNew Zealand (RIANZ)[35]\n12\nNorway (VG-lista)[72]\n7\nSpain (PROMUSICAE)[70]\n1\nSweden (Sverigetopplistan)[80]\n10\nSwitzerland (Schweizer Hitparade)[73]\n3\nUK Singles (OCC)[27]\n12\nUS Digital Song Sales (Billboard)[81]\n2\nChart (2010)\nPeakposition\nSpain (PROMUSICAE)[70]\n12\nSwitzerland (Schweizer Hitparade)[73]\n68\nUK Singles (OCC)[27]\n68\nChart (2012)\nPeakposition\nFrance (SNEP)[68]\n143\nIreland (IRMA)[55]\n30\nUK Singles (OCC)[27]\n49\nChart (2013)\nPeakposition\nFrance (SNEP)[68]\n159\nUK Singles (OCC)[27]\n48\nUS Billboard Hot 100[82]\n42\nChart (2014)\nPeakposition\nFrance (SNEP)[68]\n152\nSpain (PROMUSICAE)[70]\n38\nUK Singles (OCC)[27]\n57\nUS Billboard Hot 100[83]\n35\nChart (2015)\nPeakposition\nFrance (SNEP)[68]\n145\nSpain (PROMUSICAE)[70]\n48\nUK Singles (OCC)[27]\n61\nUS Billboard Hot 100[84]\n45\nChart (2016)\nPeakposition\nFrance (SNEP)[68]\n164\nUK Singles (OCC)[27]\n62\nChart (2017)\nPeakposition\nFrance (SNEP)[68]\n46\nSpain (PROMUSICAE)[70]\n32\nUK Singles (OCC)[27]\n34\nChart (2018)\nPeakposition\nCanada (Canadian Hot 100)[85]\n25\nUK Singles (OCC)[27]\n63\nUS Billboard Hot 100[86][87]\n31\nChart (2019)\nPeakposition\nUS Billboard Hot 100[88]\n44\nChart (2020)\nPeakposition\nGlobal 200[89]\n51\nUK Singles (OCC)[27]\n57\nUS Billboard Hot 100[90]\n48\nChart (2021)\nPeakposition\nCanada (Canadian Hot 100)[91]\n16\nGlobal 200 (Billboard)[92]\n28\nUK Singles (OCC)[93]\n40"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "34\nChart (2018)\nPeakposition\nCanada (Canadian Hot 100)[85]\n25\nUK Singles (OCC)[27]\n63\nUS Billboard Hot 100[86][87]\n31\nChart (2019)\nPeakposition\nUS Billboard Hot 100[88]\n44\nChart (2020)\nPeakposition\nGlobal 200[89]\n51\nUK Singles (OCC)[27]\n57\nUS Billboard Hot 100[90]\n48\nChart (2021)\nPeakposition\nCanada (Canadian Hot 100)[91]\n16\nGlobal 200 (Billboard)[92]\n28\nUK Singles (OCC)[93]\n40\nUK Hip Hop/R&B (OCC)[94]\n3\nUS Billboard Hot 100[95][96]\n19\nUS Billboard Digital Songs Sales[97]\n9\nChart (2022)\nPeakposition\nCanada (Canadian Hot 100)[98]\n25\nGlobal 200[99]\n37\nUK Singles (OCC)[27]\n41\nUS Billboard Hot 100[100]\n26\nChart (2023)\nPeakposition\nCanada (Canadian Hot 100)[101]\n22\nGlobal 200[102]\n39\nUK Singles (OCC)[103]\n20\nUS Billboard Hot 100[104]\n21\nYear-end charts[edit]\nChart (1984)\nPosition\nAustralia (Kent Music Report)[105]\n17\nBelgium (Ultratop Flanders)[106]\n26\nUS Billboard Hot 100[24]\n78\nChart (2009)\nPosition\nSweden (Sverigetopplistan)[107]\n88\nSwitzerland (Schweizer Hitparade)[108]\n81\nUK Singles (Official Charts Company)[109]\n143\nCertifications[edit]\nRegion\nCertification\nCertified units/sales\nAustralia (ARIA)[110]\n6\u00d7 Platinum\n420,000\u2021\nDenmark (IFPI Danmark)[111]\nPlatinum\n90,000\u2021\nFrance (SNEP)[112]\nPlatinum\n1,000,000*\nGermany (BVMI)[113]\nGold\n250,000\u2021\nItaly (FIMI)[114]\nPlatinum\n30,000\u2021\nJapan (RIAJ)[115] Full-length ringtone\nPlatinum\n250,000*\nMexico (AMPROFON)[116]\n4\u00d7 Platinum+Gold\n270,000\u2021\nSpain (PROMUSICAE)[117]\n2\u00d7 Platinum\n100,000*\nUnited Kingdom (BPI)[118] Digital sales since 2004\n2\u00d7 Platinum\n1,200,000\u2021\nUnited Kingdom (BPI)[119] other release\nGold\n500,000\u2021\nUnited States (RIAA)[120]\nDiamond\n10,000,000\u2021\nUnited States (RIAA)[121] Mastertone\nGold\n500,000*\n* Sales figures based on certification alone.\u2021 Sales+streaming figures based on certification alone.\nSee also[edit]\nList of best-selling singles\nList of best-selling singles in the United States\nList of most expensive music videos\nMichael Jackson's Thriller\nThriller (viral video)\nThrill the World\nReferences[edit]"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Diamond\n10,000,000\u2021\nUnited States (RIAA)[121] Mastertone\nGold\n500,000*\n* Sales figures based on certification alone.\u2021 Sales+streaming figures based on certification alone.\nSee also[edit]\nList of best-selling singles\nList of best-selling singles in the United States\nList of most expensive music videos\nMichael Jackson's Thriller\nThriller (viral video)\nThrill the World\nReferences[edit]\n^ \"New Singles (for the week ending November 11, 1983)\" (PDF). Music Week: 30. November 5, 1983.\n^ Semigran, Aly (February 7, 2011). \"Michael Jackson's 'Thriller': Story Behind the 'Glee' Cover\". MTV. Retrieved September 17, 2023.\n^ McPhate, Tim (November 2, 2017). \"Michael Jackson's \"Thriller\": For The Record\". The Recording Academy. Retrieved November 17, 2019.\n^ George 2004, p.\u00a023.\n^ Jones, Jel D. Lewis (2005). Michael Jackson, the King of Pop: The Big Picture \u2013 The Music! The Man! The Legend! The Interviews: An Anthology. Amber Books Publishing. p.\u00a06. ISBN\u00a00-9749779-0-X. Retrieved July 22, 2010.\n^ a b c d e f Lyle, Peter (November 25, 2007). \"Michael Jackson's monster smash\". The Daily Telegraph. Archived from the original on January 12, 2022. Retrieved January 24, 2010.\n^ Kreps, Daniel (October 5, 2016). \"Rod Temperton, 'Thriller' songwriter, dead at 66\". Rolling Stone. Retrieved July 25, 2022.\n^ a b c d e f \"Revealed: the story behind Jacko's Thriller\". M magazine. October 31, 2012. Archived from the original on November 3, 2012. Retrieved October 24, 2018.\n^ Glazer, Eliot (September 25, 2009). \"Top 1984 Songs\". AOLRadioBlog.com. AOL Inc. Retrieved January 24, 2010.\n^ Vozick-Levinson, Simon (February 18, 2008). \"Quincy Jones' 'Thriller' Memories\". EW.com. Retrieved January 24, 2010.\n^ Carr, Dan (November 30, 2022). \"The synth sounds of Michael Jackson's Thriller (and how to recreate them in your DAW)\". MusicRadar. Retrieved March 19, 2023."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ Glazer, Eliot (September 25, 2009). \"Top 1984 Songs\". AOLRadioBlog.com. AOL Inc. Retrieved January 24, 2010.\n^ Vozick-Levinson, Simon (February 18, 2008). \"Quincy Jones' 'Thriller' Memories\". EW.com. Retrieved January 24, 2010.\n^ Carr, Dan (November 30, 2022). \"The synth sounds of Michael Jackson's Thriller (and how to recreate them in your DAW)\". MusicRadar. Retrieved March 19, 2023.\n^ Rogerson, Ben (February 10, 2023). \"Watch Greg Phillinganes recreate Michael Jackson's Thriller using the original synths\". MusicRadar. Retrieved March 27, 2023.\n^ a b \"The making of Michael Jackson's Thriller\". MusicRadar. Retrieved October 25, 2018.\n^ a b c d e f g h i Griffin, Nancy (July 2010). \"The \"Thriller\" Diaries\". Vanity Fair. Retrieved January 2, 2011.\n^ a b Romano, Aja (October 31, 2018). \"Michael Jackson's \"Thriller\" is the eternal Halloween bop \u2014 and so much more\". Vox. Retrieved October 25, 2021.\n^ Eagan, Daniel (November 24, 2011). America's Film Legacy, 2009\u20132010: A Viewer's Guide to the 50 Landmark Movies Added To The National Film Registry in 2009\u201310. Bloomsbury Publishing. p.\u00a0175. ISBN\u00a0978-1-4411-9328-5. Retrieved May 14, 2016.\n^ Miles Marshall Lewis (November 30, 2022). \"#Thriller40: Cultural Critics Celebrate Michael Jackson's Impact\". BET.\n^ a b Richin, Leslie (December 2, 2014). \"On This Day In 1983, Michael Jackson's 'Thriller' Premiered On MTV\". Billboard.\n^ a b Hebblethwaite, Phil (November 21, 2013). \"How Michael Jackson's Thriller changed music videos for ever\". The Guardian. Retrieved October 29, 2018.\n^ \"Week of February 11, 1984\". Billboard. Nielsen Business Media, Inc. Retrieved October 10, 2015.\n^ \"Week of February 18, 1984\". Billboard. Nielsen Business Media, Inc. January 2, 2013. Retrieved October 10, 2015.\n^ \"Week of March 3, 1984\". Billboard. Nielsen Business Media, Inc. January 2, 2013. Retrieved October 10, 2015.\n^ \"Week of March 10, 1984\". Billboard. Nielsen Business Media, Inc. Retrieved October 10, 2015."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ \"Week of February 18, 1984\". Billboard. Nielsen Business Media, Inc. January 2, 2013. Retrieved October 10, 2015.\n^ \"Week of March 3, 1984\". Billboard. Nielsen Business Media, Inc. January 2, 2013. Retrieved October 10, 2015.\n^ \"Week of March 10, 1984\". Billboard. Nielsen Business Media, Inc. Retrieved October 10, 2015.\n^ a b \"Billboard Top 100 \u2013 1984\". billboard. Retrieved March 29, 2020.\n^ \"Week of March 3, 1984\". Billboard. Nielsen Business Media, Inc. Archived from the original on January 21, 2010. Retrieved January 23, 2010.\n^ a b c \"Week of March 10, 1984\". Billboard. Nielsen Business Media, Inc. Retrieved January 23, 2010.\n^ a b c d e f g h i j k l m n o p \"Michael Jackson\". Official Charts Company. Retrieved October 10, 2015.\n^ a b \"Toutes les Chansons N\u00b0 1 des Ann\u00e9es 80\". Infodisc.fr. Dominic Durand / InfoDisc. Archived from the original on November 20, 2012. Retrieved January 23, 2010.\n^ \"Michael Jackson \u2013 Thriller\". Top30-3.radio2.be (in Dutch). VRT \u2013 Auguste Reyerslaan. Archived from the original on February 22, 2012. Retrieved January 24, 2010.\n^ a b Ed Christman, Antony Bruno (July 2, 2009). \"Michael Jackson Music Sales Surge Could Last For Months\". Billboard. Nielsen Business Media, Inc. Retrieved January 23, 2010.\n^ \"July 11, 2009\". Billboard. Nielsen Business Media. Retrieved January 23, 2010.\n^ \"Chart For Week Up To 04/07/2009\". Official Charts Company. Retrieved January 23, 2010.\n^ \"Thriller in Italian Chart\". Hung Medien. Retrieved June 21, 2013.\n^ \"Certificazioni Download FIMI\" (PDF) (in Italian). Federation of the Italian Music Industry. Archived from the original (PDF) on June 5, 2012. Retrieved January 2, 2012.\n^ a b c d e f g h \"Michael Jackson \u2013 Thriller \u2013 Music Charts\". Acharts.us. Retrieved January 23, 2010.\n^ a b \"Track Top 40 \u2013 July 10, 2009\". Hitlisterne.dk. IFPI Danmark & Nielsen Music Control. Archived from the original on September 30, 2011. Retrieved January 23, 2010."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ a b c d e f g h \"Michael Jackson \u2013 Thriller \u2013 Music Charts\". Acharts.us. Retrieved January 23, 2010.\n^ a b \"Track Top 40 \u2013 July 10, 2009\". Hitlisterne.dk. IFPI Danmark & Nielsen Music Control. Archived from the original on September 30, 2011. Retrieved January 23, 2010.\n^ \"Thriller in Finnish Chart\". Hung Medien. Retrieved January 23, 2010.\n^ \"Eminem Debuts at No. 1 on Hot R&B/Hip-Hop Songs Chart; Michael Jackson's 'Thriller' Returns\". Billboard. November 8, 2013. Retrieved October 2, 2016.\n^ \"Top 100 Songs | Billboard Hot 100 Chart\". Billboard. Retrieved November 11, 2018.\n^ a b \"Michael Jackson's 'Thriller' Leads Halloween Treats on Billboard Hot 100\". Billboard. Retrieved November 9, 2021.\n^ \"American\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". Recording Industry Association of America.\n^ \"Rock Music, etc., Terms\". Georgetown College. October 26, 1999. Archived from the original on May 18, 2011. Retrieved January 8, 2010.\n^ \"Hip Hop Single Sales: The Weeknd, Zay Hilfigerrr & Drake\". Hip Hop DX. November 13, 2016. Retrieved November 14, 2016.\n^ \"Michael Jackson's Catalogue Garners Major New Gold & Platinum Awards\". RIAA. August 23, 2018. Retrieved December 21, 2018.\n^ Appel, Rich (October 30, 2014). \"Revisionist History, Part 3: Michael Jackson Gets Revenge on Prince! Year-End Hits of the Past, Re-Analyzed\". Billboard. Prometheus Global Media. Retrieved October 30, 2014.\n^ \"Michael Jackson Scores Three No. 1 Hits On The Billboard Charts This Week\". Forbes. Retrieved November 10, 2023.\n^ Lasimone, Ashley (October 28, 2009). \"Clash of the Cover Songs: Michael Jackson vs. Imogen Heap\". Spinner.com. AOL Inc. Retrieved January 23, 2010.\n^ Pareles, Jon (September 3, 1987). \"Critic's Notebook; How Good Is Jackson's 'Bad'?\". The New York Times. Retrieved January 25, 2010.\n^ Powers, Ann (February 15, 2008). \"Nine reasons why Jackson masterpiece remains a 'Thriller'\". SouthCoastToday.com. Dow Jones Local Media Group. Retrieved February 6, 2010."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ Pareles, Jon (September 3, 1987). \"Critic's Notebook; How Good Is Jackson's 'Bad'?\". The New York Times. Retrieved January 25, 2010.\n^ Powers, Ann (February 15, 2008). \"Nine reasons why Jackson masterpiece remains a 'Thriller'\". SouthCoastToday.com. Dow Jones Local Media Group. Retrieved February 6, 2010.\n^ Comstock, Miriam Marcus and Courtney. \"Thriller Chiller For Jackson\". Forbes. Retrieved November 4, 2019.\n^ Kent, David (2003). Australian Chart Book 1970\u20131992. Australian Chart Book. ISBN\u00a00-646-11917-6.\n^ \"Michael Jackson \u2013 Thriller\" (in Dutch). Ultratop 50.\nRetrieved December 14, 2021.\n^ \"Top Singles \u2013 Volume 40, No. 1, March 10, 1984\". RPM. Archived from the original on October 17, 2012. Retrieved August 3, 2010.\n^ a b Pennanen, Timo (2021). \"Michael Jackson\". Sis\u00e4lt\u00e4\u00e4 hitin - 2. laitos Levyt ja esitt\u00e4j\u00e4t Suomen musiikkilistoilla 1.1.1960\u201330.6.2021 (PDF). Helsinki: Kustannusosakeyhti\u00f6 Otava. p.\u00a0113. Retrieved May 29, 2022.\n^ a b c \"Search Results: Thriller\". IrishCharts.ie. Irish Recorded Music Association. Retrieved January 25, 2010.\n^\n\"Nederlandse Top 40 \u2013 week 2, 1984\" (in Dutch). Dutch Top 40.\n^ a b c \"Michael Jackson \u2013 Thriller\" (in Dutch). Single Top 100.\n^ \"Michael Jackson \u2013 Thriller\". Top 40 Singles.\n^ \"Top 3 in Europe\" (PDF). Music & Media. May 14, 1984. p.\u00a012. Retrieved October 29, 2021.\n^ \"SA Charts 1965\u2013March 1989\". Retrieved September 5, 2018.\n^ Salaverri, Fernando (September 2005). S\u00f3lo \u00e9xitos: a\u00f1o a a\u00f1o, 1959\u20132002 (in Spanish) (1st\u00a0ed.). Spain: Fundaci\u00f3n Autor-SGAE. ISBN\u00a084-8048-639-2.\n^ Whitburn, Joel (2014). Cash Box Pop Hits 1952-1996. Sheridan Books, Inc. ISBN\u00a0978-0-89820-209-0.\n^ \"Michael Jackson Chart History (Hot 100)\". Billboard. September 9, 2021. Retrieved September 9, 2021.\n^ a b \"Allmusic (Thriller > Charts & Awards > Billboard Singles)\". Allmusic.com. Rovi Corporation. Retrieved January 23, 2010.\n^ Whitburn, Joel (1993). Top Adult Contemporary: 1961\u20131993. Record Research. p.\u00a0118.\n^ \"Michael Jackson\"."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ \"Michael Jackson Chart History (Hot 100)\". Billboard. September 9, 2021. Retrieved September 9, 2021.\n^ a b \"Allmusic (Thriller > Charts & Awards > Billboard Singles)\". Allmusic.com. Rovi Corporation. Retrieved January 23, 2010.\n^ Whitburn, Joel (1993). Top Adult Contemporary: 1961\u20131993. Record Research. p.\u00a0118.\n^ \"Michael Jackson\".\n^ \"Offiziellecharts.de \u2013 Michael Jackson \u2013 Thriller\" (in German). GfK Entertainment charts.\nRetrieved March 18, 2019.\n^ a b c d e f g \"Michael Jackson \u2013 Thriller\" (in French). Les classement single.\n^ a b \"Michael Jackson \u2013 Thriller\". Top Digital Download.\n^ a b c d e f \"Michael Jackson \u2013 Thriller\" Canciones Top 50.\n^ a b \"Michael Jackson \u2013 Thriller\" (in German). \u00d63 Austria Top 40.\n^ a b \"Michael Jackson \u2013 Thriller\". VG-lista.\n^ a b c \"Michael Jackson \u2013 Thriller\". Swiss Singles Chart.\n^ \"Michael Jackson \u2013 Thriller\". ARIA Top 50 Singles.\n^ \"30 Back Catalogue Singles \u2013 July 18, 2009\". UltraTop.be. Hung Medien. Retrieved January 24, 2010.\n^ \"30 Back Catalogue Singles \u2013 July 4, 2009\". UltraTop.be. Hung Medien. Retrieved January 24, 2010.\n^ \"Michael Jackson Album & Song Chart History\". Billboard.com. Nielsen Business Media. Retrieved October 29, 2011.\n^ \"Michael Jackson: Thriller\" (in Finnish). Musiikkituottajat.\n^ \"Download Single Top 50 \u2013 04/07/2009\". Lescharts.com. Hung Medien. Retrieved January 23, 2010.\n^ \"Michael Jackson \u2013 Thriller\". Singles Top 100.\n^ \"Michael Jackson Chart History (Digital Song Sales)\". Billboard.\n^ \"The Hot 100, Week of November 16, 2013\". Billboard. Prometheus Global Media. Retrieved November 12, 2015.\n^ \"The Hot 100, Week of November 15, 2014\". Billboard. Prometheus Global Media.\n^ \"The Hot 100, Week of November 21, 2015\". Billboard. Prometheus Global Media. Retrieved November 12, 2015.\n^ \"Michael Jackson Chart History (Canadian Hot 100)\". Billboard.\nRetrieved November 6, 2018.\n^ Zellner, Xander. \"Michael Jackson's 'Thriller' Returns to Hot 100, Thanks to Halloween Gains\". Billboard. Retrieved November 6, 2018."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ \"The Hot 100, Week of November 21, 2015\". Billboard. Prometheus Global Media. Retrieved November 12, 2015.\n^ \"Michael Jackson Chart History (Canadian Hot 100)\". Billboard.\nRetrieved November 6, 2018.\n^ Zellner, Xander. \"Michael Jackson's 'Thriller' Returns to Hot 100, Thanks to Halloween Gains\". Billboard. Retrieved November 6, 2018.\n^ \"The Hot 100, Week of November 10, 2018\". Billboard. Retrieved September 9, 2021.\n^ \"The Hot 100, Week of November 9, 2019\". Billboard. Retrieved March 20, 2021.\n^ \"The Global 200, Week of November 14, 2020\". Billboard. Retrieved November 8, 2023.\n^ \"The Hot 100, Week of November 14, 2020\". Billboard. Retrieved November 14, 2020.\n^ \"Canadian Hot 100, Week of November 13, 2021\". Billboard. Retrieved November 23, 2021.\n^ \"Michael Jackson Chart History (Global 200)\". Billboard.\nRetrieved November 9, 2021.\n^ \"Official Singles Chart Top 100\". Official Charts Company.\nRetrieved November 8, 2023.\n^ \"Official Hip Hop and R&B Singles Chart Top 40\". Official Charts Company.\nRetrieved November 5, 2021.\n^ \"Michael Jackson's 'Thriller' Leads Halloween Treats on Billboard Hot 100\". Billboard. Retrieved November 8, 2021.\n^ \"The Hot 100, Week of November 13, 2021\". Billboard. Retrieved November 5, 2022.\n^ \"Digital Song Sales Chart, Week of November 13, 2021\". Billboard. Retrieved November 11, 2021.\n^ \"Canadian Hot 100, Week of November 12, 2022\". Billboard. Retrieved November 8, 2022.\n^ \"The Global 200, Week of November 12, 2022\". Billboard. Retrieved November 8, 2022.\n^ \"The Hot 100, Week of November 12, 2022\". Billboard. Retrieved November 8, 2022.\n^ \"Canadian Hot 100, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023.\n^ \"The Global 200, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023.\n^ \"Official Singles Chart Top 100\". Official Charts Company.\nRetrieved November 8, 2023.\n^ \"The Hot 100, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023."}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ \"Canadian Hot 100, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023.\n^ \"The Global 200, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023.\n^ \"Official Singles Chart Top 100\". Official Charts Company.\nRetrieved November 8, 2023.\n^ \"The Hot 100, Week of November 11, 2023\". Billboard. Retrieved November 8, 2023.\n^ \"Kent Music Report No 548 \u2013 31 December 1984 > National Top 100 Singles for 1984\". Kent Music Report. Retrieved January 23, 2023 \u2013 via Imgur.com.\n^ \"Jaaroverzichten 1984\". Ultratop. Retrieved December 14, 2021.\n^ \"\u00c5rslista Singular \u2013 \u00c5r 2009\" (in Swedish). Sverigetopplistan. Retrieved March 29, 2020.\n^ \"Schweizer Jahreshitparade 2009 \u2013 hitparade.ch\". Hung Medien. Retrieved March 29, 2020.\n^ \"Charts Plus Year end 2009\" (PDF). Charts Plus. Retrieved May 16, 2020.\n^ \"ARIA Charts \u2013 Accreditations \u2013 2021 Singles\" (PDF). Australian Recording Industry Association.\n^ \"Danish\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". IFPI Danmark. Retrieved July 2, 2023.\n^ \"French\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\" (in French). InfoDisc. Retrieved November 28, 2022. Select MICHAEL JACKSON and click OK.\n^ \"Gold-/Platin-Datenbank (Michael Jackson;\u00a0'Thriller')\" (in German). Bundesverband Musikindustrie. Retrieved February 18, 2023.\n^ \"Italian\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\" (in Italian). Federazione Industria Musicale Italiana. Select \"2014\" in the \"Anno\" drop-down menu. Select \"Thriller\" in the \"Filtra\" field. Select \"Singoli\" under \"Sezione\".\n^ \"Japanese\nringtone\ncertifications \u2013 Michael Jackson \u2013 Thriller\" (in Japanese). Recording Industry Association of Japan. Retrieved December 30, 2020. Select 2009\u5e7411\u6708 on the drop-down menu\n^ \"Certificaciones\" (in Spanish). Asociaci\u00f3n Mexicana de Productores de Fonogramas y Videogramas. Retrieved November 28, 2022. Type Michael Jackson in the box under the ARTISTA column heading\u00a0and Thriller in the box under the T\u00cdTULO column heading.\n^ \"Spanish\nsingle"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "^ \"Certificaciones\" (in Spanish). Asociaci\u00f3n Mexicana de Productores de Fonogramas y Videogramas. Retrieved November 28, 2022. Type Michael Jackson in the box under the ARTISTA column heading\u00a0and Thriller in the box under the T\u00cdTULO column heading.\n^ \"Spanish\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". El portal de M\u00fasica. Productores de M\u00fasica de Espa\u00f1a.\n^ \"British\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". British Phonographic Industry. Retrieved March 17, 2023.\n^ \"British\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". British Phonographic Industry. Retrieved March 17, 2023.\n^ \"American\nsingle\ncertifications \u2013 Michael Jackson \u2013 Thriller\". Recording Industry Association of America. Retrieved August 29, 2022.\n^ \"American\nringtone\ncertifications \u2013 Michael Jackson \u2013 Thriller\". Recording Industry Association of America.\nBibliography\nBrooks, Darren (2002). Michael Jackson: An Exceptional Journey. Chrome Dreams. ISBN\u00a01-84240-178-5.\nGeorge, Nelson (2004). Michael Jackson: The Ultimate Collection (booklet). Sony BMG.\nGrant, Adrian (2009). Michael Jackson: The Visual Documentary. Omnibus Press. ISBN\u00a0978-1-84938-261-8.\nJones, Jel (2005). Michael Jackson, the King of Pop: The Big Picture: the Music! the Man! the Legend! the Interviews!. Amber Books Publishing. ISBN\u00a00-9749779-0-X.\nTaraborrelli, J. Randy (2004). The Magic and the Madness. Terra Alta, WV: Headline. ISBN\u00a00-330-42005-4.\nHalstead, Craig (2003). Michael Jackson The Solo Years. On-Line Ltd. ISBN\u00a0978-0-7552-0091-7.\nvteMichael Jackson: ThrillerSide one\n\"Wanna Be Startin' Somethin'\"\n\"Baby Be Mine\"\n\"The Girl Is Mine\"\n\"Thriller\"\nSide two\n\"Beat It\"\n\"Billie Jean\"\n\"Human Nature\"\n\"P.Y.T. (Pretty Young Thing)\"\n\"The Lady in My Life\"\nRelated articles\nE.T. the Extra-Terrestrial (audiobook)\nFarewell My Summer Love\nVictory\nVictory Tour\nMichael Jackson's Thriller\nThriller jacket\nThriller 25\nThriller 40\nThriller 40 (film)\nThrill the World\nThriller viral video\nDonga\nThriller \u2013 Live"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "\"Baby Be Mine\"\n\"The Girl Is Mine\"\n\"Thriller\"\nSide two\n\"Beat It\"\n\"Billie Jean\"\n\"Human Nature\"\n\"P.Y.T. (Pretty Young Thing)\"\n\"The Lady in My Life\"\nRelated articles\nE.T. the Extra-Terrestrial (audiobook)\nFarewell My Summer Love\nVictory\nVictory Tour\nMichael Jackson's Thriller\nThriller jacket\nThriller 25\nThriller 40\nThriller 40 (film)\nThrill the World\nThriller viral video\nDonga\nThriller \u2013 Live\nMichael Jackson albums discography\nvteMichael Jackson songs\nSingles\nSongs\nUnreleased songs\n1970s\n\"Got to Be There\"\n\"Ain't No Sunshine\"\n\"I Wanna Be Where You Are\"\n\"Rockin' Robin\"\n\"Love Is Here and Now You're Gone\"\n\"You've Got a Friend\"\n\"Ben\"\n\"Everybody's Somebody's Fool\"\n\"My Girl\"\n\"Shoo-Be-Doo-Be-Doo-Da-Day\"\n\"We've Got a Good Thing Going\"\n\"With a Child's Heart\"\n\"Morning Glow\"\n\"All the Things You Are\"\n\"Happy\"\n\"Too Young\"\n\"Music and Me\"\n\"We're Almost There\"\n\"Just a Little Bit of You\"\n\"You Can't Win\"\n\"Don't Stop 'Til You Get Enough\"\n\"Rock with You\"\n\"Working Day and Night\"\n\"It's the Falling in Love\"\n1980s\n\"Off the Wall\"\n\"Girlfriend\"\n\"She's Out of My Life\"\n\"One Day in Your Life\"\n\"The Girl Is Mine\"\n\"Billie Jean\"\n\"Beat It\"\n\"Wanna Be Startin' Somethin'\"\n\"Human Nature\"\n\"P.Y.T. (Pretty Young Thing)\"\n\"Thriller\"\n\"You've Really Got a Hold on Me\"\n\"Here I Am (Come and Take Me)\"\n\"Lonely Teardrops\"\n\"That's What Love Is Made Of\"\n\"Farewell My Summer Love\"\n\"Girl You're So Together\"\n\"I Just Can't Stop Loving You\"\n\"Bad\"\n\"The Way You Make Me Feel\"\n\"Speed Demon\"\n\"Liberian Girl\"\n\"Just Good Friends\"\n\"Another Part of Me\"\n\"Man in the Mirror\"\n\"Dirty Diana\"\n\"Smooth Criminal\"\n\"Leave Me Alone\"\n\"Twenty-Five Miles\"\n1990s\n\"Black or White\"\n\"Jam\"\n\"In the Closet\"\n\"Remember the Time\"\n\"Heal the World\"\n\"Who Is It\"\n\"Give In to Me\"\n\"Will You Be There\"\n\"Gone Too Soon\"\n\"Dangerous\"\n\"Come Together\"\n\"Scream\"\n\"Childhood\"\n\"They Don't Care About Us\"\n\"Stranger in Moscow\"\n\"This Time Around\"\n\"Earth Song\"\n\"D.S.\"\n\"You Are Not Alone\"\n\"Tabloid Junkie\"\n\"HIStory\"\n\"Smile\"\n\"Blood on the Dance Floor\"\n\"Ghosts\"\n\"Is It Scary\"\n\"On the Line\"\n2000s"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "\"Jam\"\n\"In the Closet\"\n\"Remember the Time\"\n\"Heal the World\"\n\"Who Is It\"\n\"Give In to Me\"\n\"Will You Be There\"\n\"Gone Too Soon\"\n\"Dangerous\"\n\"Come Together\"\n\"Scream\"\n\"Childhood\"\n\"They Don't Care About Us\"\n\"Stranger in Moscow\"\n\"This Time Around\"\n\"Earth Song\"\n\"D.S.\"\n\"You Are Not Alone\"\n\"Tabloid Junkie\"\n\"HIStory\"\n\"Smile\"\n\"Blood on the Dance Floor\"\n\"Ghosts\"\n\"Is It Scary\"\n\"On the Line\"\n2000s\n\"Speechless\"\n\"You Rock My World\"\n\"Heaven Can Wait\"\n\"Butterflies\"\n\"Cry\"\n\"One More Chance\"\n\"Cheater\"\n\"(I Like) The Way You Love Me\"\n\"Fall Again\"\n\"This Is It\"\n2010s\n\"Hold My Hand\"\n\"Hollywood Tonight\"\n\"(I Can't Make It) Another Day\"\n\"Behind the Mask\"\n\"Don't Be Messin' 'Round\"\n\"I'm So Blue\"\n\"Price of Fame\"\n\"Love Never Felt So Good\"\n\"Chicago\"\n\"Loving You\"\n\"A Place with No Name\"\n\"Slave to the Rhythm\"\n\"Blue Gangsta\"\n2020s\n\"She's Trouble\"\nOther\n\"We Are the World\"\n\"Mind Is the Magic\"\n\"What More Can I Give\"\n\"We Are the World 25 for Haiti\"\n\"Blood on the Dance Floor x Dangerous\"\n\"Diamonds Are Invincible\"\nFeatured\n\"Ease on Down the Road\"\n\"A Brand New Day\"\n\"Night Time Lover\"\n\"Papa Was a Rollin' Stone\"\n\"State of Independence\"\n\"Muscles\"\n\"Say Say Say\"\n\"Somebody's Watching Me\"\n\"Don't Stand Another Chance\"\n\"Centipede\"\n\"Tell Me I'm Not Dreamin' (Too Good to Be True)\"\n\"Eaten Alive\"\n\"Get It\"\n\"2300 Jackson Street\"\n\"Do the Bartman\"\n\"Whatzupwitu\"\n\"Why\"\n\"I Need You\"\n\"We Be Ballin'\"\n\"Girls, Girls, Girls\"\n\"All in Your Name\"\n\"There Must Be More to Life Than This\"\n\"Low\"\n\"Don't Matter to Me\"\nCategory\nAuthority control databases\nMusicBrainz work\nRetrieved from \"https://en.wikipedia.org/w/index.php?title=Thriller_(song)&oldid=1212467768\""}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "\nCategories: 1982 songs1983 singles1984 singlesCBS Records singlesColumbia Records singlesCompositions with a narratorEpic Records singlesHalloween songsMichael Jackson songsNumber-one singles in SpainSNEP Top Singles number-one singlesSong recordings produced by Quincy JonesSongs about monstersSongs written by Rod TempertonHidden categories: CS1 Dutch-language sources (nl)CS1 Italian-language sources (it)CS1 Spanish-language sources (es)Articles with German-language sources (de)CS1 Swedish-language sources (sv)CS1 French-language sources (fr)CS1 German-language sources (de)Cite certification used for Italy without IDCS1 Japanese-language sources (ja)Articles with short descriptionShort description is different from WikidataGood articlesUse American English from November 2021All Wikipedia articles written in American EnglishUse mdy dates from November 2014Articles with hAudio microformatsCertification Cite Ref usages outside Certification Table EntrySingle chart usages for FlandersSingle chart usages for Dutch40Single chart called without artistSingle chart called without songSingle chart usages for Dutch100Single chart usages for New ZealandSingle chart usages for West GermanySingle chart usages for FranceSingle chart usages for ItalySingle chart making named refSingle chart usages for SpainSingle chart usages for AustriaSingle chart usages for NorwaySingle chart usages for SwissSingle chart usages for AustraliaSingle chart usages for FinlandSingle chart usages for SwedenSingle chart usages for BillboarddigitalsongsSingle chart usages for CanadaSingle chart usages for Billboardglobal200Single chart usages for UKSingle chart usages for UKrandbCertification Table Entry usages for AustraliaPages using certification Table Entry with streaming figuresCertification Table Entry usages for DenmarkCertification Table Entry usages for FrancePages using certification Table Entry with sales figuresCertification Table Entry usages for GermanyCertification Table Entry usages for ItalyCertification Table Entry usages for JapanCertification Table Entry usages for MexicoCertification Table Entry usages for SpainCertification Table Entry usages for United KingdomCertification Table Entry usages for United StatesPages using certification Table Entry with sales footnotePages using certification Table Entry with streaming footnoteArticles with MusicBrainz work identifiers"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "This page was last edited on 8 March 2024, at 01:12\u00a0(UTC).\nText is available under the Creative Commons Attribution-ShareAlike License 4.0;\nadditional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia\u00ae is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.\nPrivacy policy\nAbout Wikipedia\nDisclaimers\nContact Wikipedia\nCode of Conduct\nDevelopers\nStatistics\nCookie statement\nMobile view\nToggle limited content width"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": "Jon Pareles of The New York Times noted that &quot;&#x27;Billie Jean&#x27;, &#x27;Beat It&#x27;, &#x27;Wanna Be Starting&#x27; Something&#x27; &#x27; and &quot;the movie in the song &#x27;Thriller&#x27;&quot;, were the songs, unlike the &quot;fluff&quot; &quot;P.Y.T.&quot;, that were &quot;the hits that made Thriller a world-beater; along with Mr. Jackson&#x27;s stage and video presence, ...Jon Pareles of The New York Times noted that \"'Billie Jean', 'Beat It', 'Wanna Be Starting' Something' ' and \"the movie in the song 'Thriller'\", were the songs, unlike the \"fluff\" \"P.Y.T.\", that were \"the hits that made Thriller a world-beater; along with Mr. Jackson's stage and video presence, listeners must have identified with his willingness to admit terror.\" It appears on several of Jackson's greatest-hits albums and has been covered by numerous artists. The song has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. \"Thriller\" is a disco-funk song The introduction features sound effects such as a creaking door, thunder, feet walking on wooden planks, winds and howling wolves. This gave Jackson at least one top-20 hit across seven consecutive decades from 1969 on the Billboard Hot 100. \"Thriller\" was certified platinum by the Recording Industry Association of America on December 4, 1989, for sales of over one million physical units in the US As of August 2016, the song had sold 4,024,398 copies in the US. \"Thriller\" is certified Diamond by the Recording Industry Association of America. It appears on several of Jackson's greatest-hits albums and has been covered by numerous artists. The song has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. \"Thriller\" has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween"}
{"query": "who sang the hit song \"thriller\"?", "domain": "music", "doc": ". \"Thriller\" is certified Diamond by the Recording Industry Association of America. It appears on several of Jackson's greatest-hits albums and has been covered by numerous artists. The song has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. \"Thriller\" has returned to the Billboard Hot 100 chart multiple times due to its popularity around Halloween. It re-entered the Billboard Hot 100 in October 2013 at number 42, number 31 in November 2018, and number 19 in November 2021, its highest placement since 1984. This gave Jackson at least one top-20 hit across seven consecutive decades from 1969 on the Billboard Hot 100."}

View File

@@ -0,0 +1,37 @@
# Retrieval tool for agent
The retrieval tool in this example is an OPEA megaservice that is comprised of a query embedder, a document retriever and a document reranker.
## Launch microservices
```
bash launch_retrieval_tool.sh
```
## Index data into vector database
In this example, we use an example jsonl file to ingest example documents into the vector database. For more ways to ingest data and the type of documents supported by OPEA dataprep microservices, please refer to the documentation in the opea-project/GenAIComps repo.
1. create a conda env
2. Run commands below
```
bash run_ingest_data.sh
```
## Validate services
```
export ip_address=$(hostname -I | awk '{print $1}')
curl http://${ip_address}:8889/v1/retrievaltool -X POST -H "Content-Type: application/json" -d '{
"text": "Taylor Swift hometown"
}'
```
## Consume retrieval tool
The endpoint for the retrieval tool is
```
http://${ip_address}:8889/v1/retrievaltool
```

View File

@@ -0,0 +1,77 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import argparse
import json
import os
import requests
import tqdm
def get_args():
parser = argparse.ArgumentParser(description="Index data")
parser.add_argument("--host_ip", type=str, default="localhost", help="Host IP")
parser.add_argument("--port", type=int, default=6007, help="Port")
parser.add_argument("--filedir", type=str, default=None, help="file directory")
parser.add_argument("--filename", type=str, default=None, help="file name")
parser.add_argument("--chunk_size", type=int, default=10000, help="Chunk size")
parser.add_argument("--chunk_overlap", type=int, default=0, help="Chunk overlap")
args = parser.parse_args()
return args
def split_jsonl_into_txts(jsonl_file):
docs = []
n = 0
with open(jsonl_file, "r") as f:
for line in f:
data = json.loads(line)
docs.append(data["doc"])
return docs
def write_docs_to_disk(docs, output_folder):
output_files = []
for i, text in enumerate(docs):
output = os.path.join(output_folder, str(i) + ".txt")
output_files.append(output)
with open(output, "w") as f:
f.write(text)
return output_files
def delete_files(files):
for file in files:
os.remove(file)
def main():
args = get_args()
print(args)
host_ip = args.host_ip
port = args.port
proxies = {"http": ""}
url = "http://{host_ip}:{port}/v1/dataprep".format(host_ip=host_ip, port=port)
# Split jsonl file into json files
files = split_jsonl_into_txts(os.path.join(args.filedir, args.filename))
file_list = write_docs_to_disk(files, args.filedir)
print(file_list)
for file in tqdm.tqdm(file_list):
print("Indexing file: ", file)
files = [("files", (f, open(f, "rb"))) for f in [file]]
payload = {"chunk_size": args.chunk_size, "chunk_overlap": args.chunk_overlap}
resp = requests.request("POST", url=url, headers={}, files=files, data=payload, proxies=proxies)
print(resp.text)
print("Removing temp files....")
delete_files(file_list)
print("ALL DONE!")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,25 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
host_ip=$(hostname -I | awk '{print $1}')
export HF_CACHE_DIR=${HF_CACHE_DIR}
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export no_proxy=${no_proxy}
export http_proxy=${http_proxy}
export https_proxy=${https_proxy}
export EMBEDDING_MODEL_ID="BAAI/bge-base-en-v1.5"
export RERANK_MODEL_ID="BAAI/bge-reranker-base"
export TEI_EMBEDDING_ENDPOINT="http://${host_ip}:6006"
export TEI_RERANKING_ENDPOINT="http://${host_ip}:8808"
export REDIS_URL="redis://${host_ip}:6379"
export INDEX_NAME="rag-redis"
export MEGA_SERVICE_HOST_IP=${host_ip}
export EMBEDDING_SERVICE_HOST_IP=${host_ip}
export RETRIEVER_SERVICE_HOST_IP=${host_ip}
export RERANK_SERVICE_HOST_IP=${host_ip}
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8889/v1/retrievaltool"
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
docker compose -f $WORKDIR/GenAIExamples/DocIndexRetriever/docker_compose/intel/cpu/xeon/compose.yaml up -d

View File

@@ -0,0 +1,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
FILEDIR=${WORKDIR}/GenAIExamples/AgentQnA/example_data/
FILENAME=test_docs_music.jsonl
python3 index_data.py --filedir ${FILEDIR} --filename ${FILENAME} --host_ip $host_ip

View File

@@ -0,0 +1,48 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
function get_genai_comps() {
if [ ! -d "GenAIComps" ] ; then
git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../
fi
}
function build_docker_images_for_retrieval_tool(){
cd $WORKDIR/GenAIExamples/DocIndexRetriever/docker_image_build/
# git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../
get_genai_comps
echo "Build all the images with --no-cache..."
service_list="doc-index-retriever dataprep-redis embedding-tei retriever-redis reranking-tei"
docker compose -f build.yaml build ${service_list} --no-cache
docker pull ghcr.io/huggingface/text-embeddings-inference:cpu-1.5
docker images && sleep 1s
}
function build_agent_docker_image() {
cd $WORKDIR/GenAIExamples/AgentQnA/docker_image_build/
get_genai_comps
echo "Build agent image with --no-cache..."
docker compose -f build.yaml build --no-cache
}
function main() {
echo "==================== Build docker images for retrieval tool ===================="
build_docker_images_for_retrieval_tool
echo "==================== Build docker images for retrieval tool completed ===================="
echo "==================== Build agent docker image ===================="
build_agent_docker_image
echo "==================== Build agent docker image completed ===================="
}
main

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export HF_CACHE_DIR=$WORKDIR/hf_cache
if [ ! -d "$HF_CACHE_DIR" ]; then
echo "Creating HF_CACHE directory"
mkdir -p "$HF_CACHE_DIR"
fi
function start_retrieval_tool() {
echo "Starting Retrieval tool"
cd $WORKDIR/GenAIExamples/AgentQnA/retrieval_tool/
bash launch_retrieval_tool.sh
}
echo "==================== Start retrieval tool ===================="
start_retrieval_tool
sleep 20 # needed for downloading the models
echo "==================== Retrieval tool started ===================="

View File

@@ -0,0 +1,68 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export host_ip=$ip_address
echo "ip_address=${ip_address}"
function validate() {
local CONTENT="$1"
local EXPECTED_RESULT="$2"
local SERVICE_NAME="$3"
if echo "$CONTENT" | grep -q "$EXPECTED_RESULT"; then
echo "[ $SERVICE_NAME ] Content is as expected: $CONTENT"
echo 0
else
echo "[ $SERVICE_NAME ] Content does not match the expected result: $CONTENT"
echo 1
fi
}
function ingest_data_and_validate() {
echo "Ingesting data"
cd $WORKDIR/GenAIExamples/AgentQnA/retrieval_tool/
echo $PWD
local CONTENT=$(bash run_ingest_data.sh)
local EXIT_CODE=$(validate "$CONTENT" "Data preparation succeeded" "dataprep-redis-server")
echo "$EXIT_CODE"
local EXIT_CODE="${EXIT_CODE:0-1}"
echo "return value is $EXIT_CODE"
if [ "$EXIT_CODE" == "1" ]; then
docker logs dataprep-redis-server
return 1
fi
}
function validate_retrieval_tool() {
echo "----------------Test retrieval tool ----------------"
local CONTENT=$(http_proxy="" curl http://${ip_address}:8889/v1/retrievaltool -X POST -H "Content-Type: application/json" -d '{
"text": "Who sang Thriller"
}')
local EXIT_CODE=$(validate "$CONTENT" "Thriller" "retrieval-tool")
if [ "$EXIT_CODE" == "1" ]; then
docker logs retrievaltool-xeon-backend-server
exit 1
fi
}
function main(){
echo "==================== Ingest data ===================="
ingest_data_and_validate
echo "==================== Data ingestion completed ===================="
echo "==================== Validate retrieval tool ===================="
validate_retrieval_tool
echo "==================== Retrieval tool validated ===================="
}
main

View File

@@ -0,0 +1,60 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
echo "OPENAI_API_KEY=${OPENAI_API_KEY}"
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
function start_agent_and_api_server() {
echo "Starting CRAG server"
docker run -d --runtime=runc --name=kdd-cup-24-crag-service -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
echo "Starting Agent services"
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/cpu/xeon
bash launch_agent_service_openai.sh
}
function validate() {
local CONTENT="$1"
local EXPECTED_RESULT="$2"
local SERVICE_NAME="$3"
if echo "$CONTENT" | grep -q "$EXPECTED_RESULT"; then
echo "[ $SERVICE_NAME ] Content is as expected: $CONTENT"
echo 0
else
echo "[ $SERVICE_NAME ] Content does not match the expected result: $CONTENT"
echo 1
fi
}
function validate_agent_service() {
echo "----------------Test agent ----------------"
local CONTENT=$(http_proxy="" curl http://${ip_address}:9090/v1/chat/completions -X POST -H "Content-Type: application/json" -d '{
"query": "Tell me about Michael Jackson song thriller"
}')
local EXIT_CODE=$(validate "$CONTENT" "Thriller" "react-agent-endpoint")
docker logs react-agent-endpoint
if [ "$EXIT_CODE" == "1" ]; then
exit 1
fi
}
function main() {
echo "==================== Start agent ===================="
start_agent_and_api_server
echo "==================== Agent started ===================="
echo "==================== Validate agent service ===================="
validate_agent_service
echo "==================== Agent service validated ===================="
}
main

View File

@@ -0,0 +1,76 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export HF_CACHE_DIR=$WORKDIR/hf_cache
if [ ! -d "$HF_CACHE_DIR" ]; then
mkdir -p "$HF_CACHE_DIR"
fi
ls $HF_CACHE_DIR
function start_agent_and_api_server() {
echo "Starting CRAG server"
docker run -d --runtime=runc --name=kdd-cup-24-crag-service -p=8080:8000 docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0
echo "Starting Agent services"
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/hpu/gaudi
bash launch_agent_service_tgi_gaudi.sh
}
function validate() {
local CONTENT="$1"
local EXPECTED_RESULT="$2"
local SERVICE_NAME="$3"
if echo "$CONTENT" | grep -q "$EXPECTED_RESULT"; then
echo "[ $SERVICE_NAME ] Content is as expected: $CONTENT"
echo 0
else
echo "[ $SERVICE_NAME ] Content does not match the expected result: $CONTENT"
echo 1
fi
}
function validate_agent_service() {
echo "----------------Test agent ----------------"
local CONTENT=$(http_proxy="" curl http://${ip_address}:9095/v1/chat/completions -X POST -H "Content-Type: application/json" -d '{
"query": "Tell me about Michael Jackson song thriller"
}')
local EXIT_CODE=$(validate "$CONTENT" "Thriller" "react-agent-endpoint")
docker logs docgrader-agent-endpoint
if [ "$EXIT_CODE" == "1" ]; then
exit 1
fi
local CONTENT=$(http_proxy="" curl http://${ip_address}:9090/v1/chat/completions -X POST -H "Content-Type: application/json" -d '{
"query": "Tell me about Michael Jackson song thriller"
}')
local EXIT_CODE=$(validate "$CONTENT" "Thriller" "react-agent-endpoint")
docker logs react-agent-endpoint
if [ "$EXIT_CODE" == "1" ]; then
exit 1
fi
}
function main() {
echo "==================== Start agent ===================="
start_agent_and_api_server
echo "==================== Agent started ===================="
echo "==================== Validate agent service ===================="
validate_agent_service
echo "==================== Agent service validated ===================="
}
main

View File

@@ -0,0 +1,50 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
echo "OPENAI_API_KEY=${OPENAI_API_KEY}"
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
function stop_agent_and_api_server() {
echo "Stopping CRAG server"
docker stop $(docker ps -q --filter ancestor=docker.io/aicrowd/kdd-cup-24-crag-mock-api:v0)
echo "Stopping Agent services"
docker stop $(docker ps -q --filter ancestor=opea/agent-langchain:latest)
}
function stop_retrieval_tool() {
echo "Stopping Retrieval tool"
docker compose -f $WORKDIR/GenAIExamples/AgentQnA/retrieval_tool/docker/docker-compose-retrieval-tool.yaml down
}
echo "=================== #1 Building docker images===================="
bash 1_build_images.sh
echo "=================== #1 Building docker images completed===================="
echo "=================== #2 Start retrieval tool===================="
bash 2_start_retrieval_tool.sh
echo "=================== #2 Retrieval tool started===================="
echo "=================== #3 Ingest data and validate retrieval===================="
bash 3_ingest_data_and_validate_retrieval.sh
echo "=================== #3 Data ingestion and validation completed===================="
echo "=================== #4 Start agent and API server===================="
bash 4_launch_and_validate_agent_openai.sh
echo "=================== #4 Agent test passed ===================="
echo "=================== #5 Stop agent and API server===================="
stop_agent_and_api_server
echo "=================== #5 Agent and API server stopped===================="
echo "=================== #6 Stop retrieval tool===================="
stop_retrieval_tool
echo "=================== #6 Retrieval tool stopped===================="
echo "ALL DONE!"

View File

@@ -0,0 +1,73 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
WORKPATH=$(dirname "$PWD")
export WORKDIR=$WORKPATH/../../
echo "WORKDIR=${WORKDIR}"
export ip_address=$(hostname -I | awk '{print $1}')
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
function stop_crag() {
cid=$(docker ps -aq --filter "name=kdd-cup-24-crag-service")
echo "Stopping container kdd-cup-24-crag-service with cid $cid"
if [[ ! -z "$cid" ]]; then docker rm $cid -f && sleep 1s; fi
}
function stop_agent_docker() {
cd $WORKPATH/docker_compose/intel/hpu/gaudi/
# docker compose -f compose.yaml down
container_list=$(cat compose.yaml | grep container_name | cut -d':' -f2)
for container_name in $container_list; do
cid=$(docker ps -aq --filter "name=$container_name")
echo "Stopping container $container_name"
if [[ ! -z "$cid" ]]; then docker rm $cid -f && sleep 1s; fi
done
}
function stop_retrieval_tool() {
echo "Stopping Retrieval tool"
local RETRIEVAL_TOOL_PATH=$WORKPATH/../DocIndexRetriever
cd $RETRIEVAL_TOOL_PATH/docker_compose/intel/cpu/xeon/
# docker compose -f compose.yaml down
container_list=$(cat compose.yaml | grep container_name | cut -d':' -f2)
for container_name in $container_list; do
cid=$(docker ps -aq --filter "name=$container_name")
echo "Stopping container $container_name"
if [[ ! -z "$cid" ]]; then docker rm $cid -f && sleep 1s; fi
done
}
echo "workpath: $WORKPATH"
echo "=================== Stop containers ===================="
stop_crag
stop_agent_docker
stop_retrieval_tool
cd $WORKPATH/tests
echo "=================== #1 Building docker images===================="
bash 1_build_images.sh
echo "=================== #1 Building docker images completed===================="
echo "=================== #2 Start retrieval tool===================="
bash 2_start_retrieval_tool.sh
echo "=================== #2 Retrieval tool started===================="
echo "=================== #3 Ingest data and validate retrieval===================="
bash 3_ingest_data_and_validate_retrieval.sh
echo "=================== #3 Data ingestion and validation completed===================="
echo "=================== #4 Start agent and API server===================="
bash 4_launch_and_validate_agent_tgi.sh
echo "=================== #4 Agent test passed ===================="
echo "=================== #5 Stop agent and API server===================="
stop_crag
stop_agent_docker
stop_retrieval_tool
echo "=================== #5 Agent and API server stopped===================="
echo "ALL DONE!"

330
AgentQnA/tools/pycragapi.py Normal file
View File

@@ -0,0 +1,330 @@
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
import json
import os
from typing import List
import requests
class CRAG(object):
"""A client for interacting with the CRAG server, offering methods to query various domains such as Open, Movie, Finance, Music, and Sports. Each method corresponds to an API endpoint on the CRAG server.
Attributes:
server (str): The base URL of the CRAG server. Defaults to "http://127.0.0.1:8080".
Methods:
open_search_entity_by_name(query: str) -> dict: Search for entities by name in the Open domain.
open_get_entity(entity: str) -> dict: Retrieve detailed information about an entity in the Open domain.
movie_get_person_info(person_name: str) -> dict: Get information about a person related to movies.
movie_get_movie_info(movie_name: str) -> dict: Get information about a movie.
movie_get_year_info(year: str) -> dict: Get information about movies released in a specific year.
movie_get_movie_info_by_id(movie_id: int) -> dict: Get movie information by its unique ID.
movie_get_person_info_by_id(person_id: int) -> dict: Get person information by their unique ID.
finance_get_company_name(query: str) -> dict: Search for company names in the finance domain.
finance_get_ticker_by_name(query: str) -> dict: Retrieve the ticker symbol for a given company name.
finance_get_price_history(ticker_name: str) -> dict: Get the price history for a given ticker symbol.
finance_get_detailed_price_history(ticker_name: str) -> dict: Get detailed price history for a ticker symbol.
finance_get_dividends_history(ticker_name: str) -> dict: Get dividend history for a ticker symbol.
finance_get_market_capitalization(ticker_name: str) -> dict: Retrieve market capitalization for a ticker symbol.
finance_get_eps(ticker_name: str) -> dict: Get earnings per share (EPS) for a ticker symbol.
finance_get_pe_ratio(ticker_name: str) -> dict: Get the price-to-earnings (PE) ratio for a ticker symbol.
finance_get_info(ticker_name: str) -> dict: Get financial information for a ticker symbol.
music_search_artist_entity_by_name(artist_name: str) -> dict: Search for music artists by name.
music_search_song_entity_by_name(song_name: str) -> dict: Search for songs by name.
music_get_billboard_rank_date(rank: int, date: str = None) -> dict: Get Billboard ranking for a specific rank and date.
music_get_billboard_attributes(date: str, attribute: str, song_name: str) -> dict: Get attributes of a song from Billboard rankings.
music_grammy_get_best_artist_by_year(year: int) -> dict: Get the Grammy Best New Artist for a specific year.
music_grammy_get_award_count_by_artist(artist_name: str) -> dict: Get the total Grammy awards won by an artist.
music_grammy_get_award_count_by_song(song_name: str) -> dict: Get the total Grammy awards won by a song.
music_grammy_get_best_song_by_year(year: int) -> dict: Get the Grammy Song of the Year for a specific year.
music_grammy_get_award_date_by_artist(artist_name: str) -> dict: Get the years an artist won a Grammy award.
music_grammy_get_best_album_by_year(year: int) -> dict: Get the Grammy Album of the Year for a specific year.
music_grammy_get_all_awarded_artists() -> dict: Get all artists awarded the Grammy Best New Artist.
music_get_artist_birth_place(artist_name: str) -> dict: Get the birthplace of an artist.
music_get_artist_birth_date(artist_name: str) -> dict: Get the birth date of an artist.
music_get_members(band_name: str) -> dict: Get the member list of a band.
music_get_lifespan(artist_name: str) -> dict: Get the lifespan of an artist.
music_get_song_author(song_name: str) -> dict: Get the author of a song.
music_get_song_release_country(song_name: str) -> dict: Get the release country of a song.
music_get_song_release_date(song_name: str) -> dict: Get the release date of a song.
music_get_artist_all_works(artist_name: str) -> dict: Get all works by an artist.
sports_soccer_get_games_on_date(team_name: str, date: str) -> dict: Get soccer games on a specific date.
sports_nba_get_games_on_date(team_name: str, date: str) -> dict: Get NBA games on a specific date.
sports_nba_get_play_by_play_data_by_game_ids(game_ids: List[str]) -> dict: Get NBA play by play data for a set of game ids.
Note:
Each method performs a POST request to the corresponding API endpoint and returns the response as a JSON dictionary.
"""
def __init__(self):
self.server = os.environ.get("CRAG_SERVER", "http://127.0.0.1:8080")
def open_search_entity_by_name(self, query: str):
url = self.server + "/open/search_entity_by_name"
headers = {"accept": "application/json"}
data = {"query": query}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def open_get_entity(self, entity: str):
url = self.server + "/open/get_entity"
headers = {"accept": "application/json"}
data = {"query": entity}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def movie_get_person_info(self, person_name: str):
url = self.server + "/movie/get_person_info"
headers = {"accept": "application/json"}
data = {"query": person_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def movie_get_movie_info(self, movie_name: str):
url = self.server + "/movie/get_movie_info"
headers = {"accept": "application/json"}
data = {"query": movie_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def movie_get_year_info(self, year: str):
url = self.server + "/movie/get_year_info"
headers = {"accept": "application/json"}
data = {"query": year}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def movie_get_movie_info_by_id(self, movid_id: int):
url = self.server + "/movie/get_movie_info_by_id"
headers = {"accept": "application/json"}
data = {"query": movid_id}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def movie_get_person_info_by_id(self, person_id: int):
url = self.server + "/movie/get_person_info_by_id"
headers = {"accept": "application/json"}
data = {"query": person_id}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_company_name(self, query: str):
url = self.server + "/finance/get_company_name"
headers = {"accept": "application/json"}
data = {"query": query}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_ticker_by_name(self, query: str):
url = self.server + "/finance/get_ticker_by_name"
headers = {"accept": "application/json"}
data = {"query": query}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_price_history(self, ticker_name: str):
url = self.server + "/finance/get_price_history"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_detailed_price_history(self, ticker_name: str):
url = self.server + "/finance/get_detailed_price_history"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_dividends_history(self, ticker_name: str):
url = self.server + "/finance/get_dividends_history"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_market_capitalization(self, ticker_name: str):
url = self.server + "/finance/get_market_capitalization"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_eps(self, ticker_name: str):
url = self.server + "/finance/get_eps"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_pe_ratio(self, ticker_name: str):
url = self.server + "/finance/get_pe_ratio"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def finance_get_info(self, ticker_name: str):
url = self.server + "/finance/get_info"
headers = {"accept": "application/json"}
data = {"query": ticker_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_search_artist_entity_by_name(self, artist_name: str):
url = self.server + "/music/search_artist_entity_by_name"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_search_song_entity_by_name(self, song_name: str):
url = self.server + "/music/search_song_entity_by_name"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_billboard_rank_date(self, rank: int, date: str = None):
url = self.server + "/music/get_billboard_rank_date"
headers = {"accept": "application/json"}
data = {"rank": rank, "date": date}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_billboard_attributes(self, date: str, attribute: str, song_name: str):
url = self.server + "/music/get_billboard_attributes"
headers = {"accept": "application/json"}
data = {"date": date, "attribute": attribute, "song_name": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_best_artist_by_year(self, year: int):
url = self.server + "/music/grammy_get_best_artist_by_year"
headers = {"accept": "application/json"}
data = {"query": year}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_award_count_by_artist(self, artist_name: str):
url = self.server + "/music/grammy_get_award_count_by_artist"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_award_count_by_song(self, song_name: str):
url = self.server + "/music/grammy_get_award_count_by_song"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_best_song_by_year(self, year: int):
url = self.server + "/music/grammy_get_best_song_by_year"
headers = {"accept": "application/json"}
data = {"query": year}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_award_date_by_artist(self, artist_name: str):
url = self.server + "/music/grammy_get_award_date_by_artist"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_best_album_by_year(self, year: int):
url = self.server + "/music/grammy_get_best_album_by_year"
headers = {"accept": "application/json"}
data = {"query": year}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_grammy_get_all_awarded_artists(self):
url = self.server + "/music/grammy_get_all_awarded_artists"
headers = {"accept": "application/json"}
result = requests.post(url, headers=headers)
return json.loads(result.text)
def music_get_artist_birth_place(self, artist_name: str):
url = self.server + "/music/get_artist_birth_place"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_artist_birth_date(self, artist_name: str):
url = self.server + "/music/get_artist_birth_date"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_members(self, band_name: str):
url = self.server + "/music/get_members"
headers = {"accept": "application/json"}
data = {"query": band_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_lifespan(self, artist_name: str):
url = self.server + "/music/get_lifespan"
headers = {"accept": "application/json"}
data = {"query": artist_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_song_author(self, song_name: str):
url = self.server + "/music/get_song_author"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_song_release_country(self, song_name: str):
url = self.server + "/music/get_song_release_country"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_song_release_date(self, song_name: str):
url = self.server + "/music/get_song_release_date"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def music_get_artist_all_works(self, song_name: str):
url = self.server + "/music/get_artist_all_works"
headers = {"accept": "application/json"}
data = {"query": song_name}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def sports_soccer_get_games_on_date(self, date: str, team_name: str = None):
url = self.server + "/sports/soccer/get_games_on_date"
headers = {"accept": "application/json"}
data = {"team_name": team_name, "date": date}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def sports_nba_get_games_on_date(self, date: str, team_name: str = None):
url = self.server + "/sports/nba/get_games_on_date"
headers = {"accept": "application/json"}
data = {"team_name": team_name, "date": date}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)
def sports_nba_get_play_by_play_data_by_game_ids(self, game_ids: List[str]):
url = self.server + "/sports/nba/get_play_by_play_data_by_game_ids"
headers = {"accept": "application/json"}
data = {"game_ids": game_ids}
result = requests.post(url, json=data, headers=headers)
return json.loads(result.text)

View File

@@ -0,0 +1,59 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
search_knowledge_base:
description: Search knowledge base for a given query. Returns text related to the query.
callable_api: tools.py:search_knowledge_base
args_schema:
query:
type: str
description: query
return_output: retrieved_data
get_artist_birth_place:
description: Get the birth place of an artist.
callable_api: tools.py:get_artist_birth_place
args_schema:
artist_name:
type: str
description: artist name
return_output: birth_place
get_billboard_rank_date:
description: Get Billboard ranking for a specific rank and date.
callable_api: tools.py:get_billboard_rank_date
args_schema:
rank:
type: int
description: song name
date:
type: str
description: date
return_output: billboard_info
get_song_release_date:
description: Get the release date of a song.
callable_api: tools.py:get_song_release_date
args_schema:
song_name:
type: str
description: song name
return_output: release_date
get_members:
description: Get the member list of a band.
callable_api: tools.py:get_members
args_schema:
band_name:
type: str
description: band name
return_output: members
get_grammy_best_artist_by_year:
description: Get the Grammy Best New Artist for a specific year.
callable_api: tools.py:get_grammy_best_artist_by_year
args_schema:
year:
type: int
description: year
return_output: grammy_best_new_artist

52
AgentQnA/tools/tools.py Normal file
View File

@@ -0,0 +1,52 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import requests
from tools.pycragapi import CRAG
def search_knowledge_base(query: str) -> str:
"""Search the knowledge base for a specific query."""
# use worker agent (DocGrader) to search the knowledge base
url = os.environ.get("WORKER_AGENT_URL")
print(url)
proxies = {"http": ""}
payload = {
"query": query,
}
response = requests.post(url, json=payload, proxies=proxies)
return response.json()["text"]
def get_grammy_best_artist_by_year(year: int) -> dict:
"""Get the Grammy Best New Artist for a specific year."""
api = CRAG()
year = int(year)
return api.music_grammy_get_best_artist_by_year(year)
def get_members(band_name: str) -> dict:
"""Get the member list of a band."""
api = CRAG()
return api.music_get_members(band_name)
def get_artist_birth_place(artist_name: str) -> dict:
"""Get the birthplace of an artist."""
api = CRAG()
return api.music_get_artist_birth_place(artist_name)
def get_billboard_rank_date(rank: int, date: str = None) -> dict:
"""Get Billboard ranking for a specific rank and date."""
api = CRAG()
rank = int(rank)
return api.music_get_billboard_rank_date(rank, date)
def get_song_release_date(song_name: str) -> dict:
"""Get the release date of a song."""
api = CRAG()
return api.music_get_song_release_date(song_name)

View File

@@ -0,0 +1,27 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import os
import requests
def search_knowledge_base(query: str) -> str:
"""Search the knowledge base for a specific query."""
url = os.environ.get("RETRIEVAL_TOOL_URL")
print(url)
proxies = {"http": ""}
payload = {
"text": query,
}
response = requests.post(url, json=payload, proxies=proxies)
print(response)
docs = response.json()["documents"]
context = ""
for i, doc in enumerate(docs):
if i == 0:
context = doc
else:
context += "\n" + doc
print(context)
return context

View File

@@ -0,0 +1,11 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
search_knowledge_base:
description: Search knowledge base for a given query. Returns text related to the query.
callable_api: worker_agent_tools.py:search_knowledge_base
args_schema:
query:
type: str
description: query
return_output: retrieved_data

32
AudioQnA/Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
FROM python:3.11-slim
RUN apt-get update -y && apt-get install -y --no-install-recommends --fix-missing \
libgl1-mesa-glx \
libjemalloc-dev \
git
RUN useradd -m -s /bin/bash user && \
mkdir -p /home/user && \
chown -R user /home/user/
WORKDIR /home/user/
RUN git clone https://github.com/opea-project/GenAIComps.git
WORKDIR /home/user/GenAIComps
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /home/user/GenAIComps/requirements.txt
COPY ./audioqna.py /home/user/audioqna.py
ENV PYTHONPATH=$PYTHONPATH:/home/user/GenAIComps
USER user
WORKDIR /home/user
ENTRYPOINT ["python", "audioqna.py"]

34
AudioQnA/README.md Normal file
View File

@@ -0,0 +1,34 @@
# AudioQnA Application
AudioQnA is an example that demonstrates the integration of Generative AI (GenAI) models for performing question-answering (QnA) on audio files, with the added functionality of Text-to-Speech (TTS) for generating spoken responses. The example showcases how to convert audio input to text using Automatic Speech Recognition (ASR), generate answers to user queries using a language model, and then convert those answers back to speech using Text-to-Speech (TTS).
## Deploy AudioQnA Service
The AudioQnA service can be deployed on either Intel Gaudi2 or Intel Xeon Scalable Processor.
### Deploy AudioQnA on Gaudi
Refer to the [Gaudi Guide](./docker_compose/intel/hpu/gaudi/README.md) for instructions on deploying AudioQnA on Gaudi.
### Deploy AudioQnA on Xeon
Refer to the [Xeon Guide](./docker_compose/intel/cpu/xeon/README.md) for instructions on deploying AudioQnA on Xeon.
## Supported Models
### ASR
The default model is [openai/whisper-small](https://huggingface.co/openai/whisper-small). It also supports all models in the Whisper family, such as `openai/whisper-large-v3`, `openai/whisper-medium`, `openai/whisper-base`, `openai/whisper-tiny`, etc.
To replace the model, please edit the `compose.yaml` and add the `command` line to pass the name of the model you want to use:
```yaml
services:
whisper-service:
...
command: --model_name_or_path openai/whisper-tiny
```
### TTS
The default model is [microsoft/SpeechT5](https://huggingface.co/microsoft/speecht5_tts). We currently do not support replacing the model. More models under the commercial license will be added in the future.

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

58
AudioQnA/audioqna.py Normal file
View File

@@ -0,0 +1,58 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import asyncio
import os
from comps import AudioQnAGateway, MicroService, ServiceOrchestrator, ServiceType
MEGA_SERVICE_HOST_IP = os.getenv("MEGA_SERVICE_HOST_IP", "0.0.0.0")
MEGA_SERVICE_PORT = int(os.getenv("MEGA_SERVICE_PORT", 8888))
ASR_SERVICE_HOST_IP = os.getenv("ASR_SERVICE_HOST_IP", "0.0.0.0")
ASR_SERVICE_PORT = int(os.getenv("ASR_SERVICE_PORT", 9099))
LLM_SERVICE_HOST_IP = os.getenv("LLM_SERVICE_HOST_IP", "0.0.0.0")
LLM_SERVICE_PORT = int(os.getenv("LLM_SERVICE_PORT", 9000))
TTS_SERVICE_HOST_IP = os.getenv("TTS_SERVICE_HOST_IP", "0.0.0.0")
TTS_SERVICE_PORT = int(os.getenv("TTS_SERVICE_PORT", 9088))
class AudioQnAService:
def __init__(self, host="0.0.0.0", port=8000):
self.host = host
self.port = port
self.megaservice = ServiceOrchestrator()
def add_remote_service(self):
asr = MicroService(
name="asr",
host=ASR_SERVICE_HOST_IP,
port=ASR_SERVICE_PORT,
endpoint="/v1/audio/transcriptions",
use_remote_service=True,
service_type=ServiceType.ASR,
)
llm = MicroService(
name="llm",
host=LLM_SERVICE_HOST_IP,
port=LLM_SERVICE_PORT,
endpoint="/v1/chat/completions",
use_remote_service=True,
service_type=ServiceType.LLM,
)
tts = MicroService(
name="tts",
host=TTS_SERVICE_HOST_IP,
port=TTS_SERVICE_PORT,
endpoint="/v1/audio/speech",
use_remote_service=True,
service_type=ServiceType.TTS,
)
self.megaservice.add(asr).add(llm).add(tts)
self.megaservice.flow_to(asr, llm)
self.megaservice.flow_to(llm, tts)
self.gateway = AudioQnAGateway(megaservice=self.megaservice, host="0.0.0.0", port=self.port)
if __name__ == "__main__":
audioqna = AudioQnAService(host=MEGA_SERVICE_HOST_IP, port=MEGA_SERVICE_PORT)
audioqna.add_remote_service()

View File

@@ -0,0 +1,51 @@
# AudioQnA accuracy Evaluation
AudioQnA is an example that demonstrates the integration of Generative AI (GenAI) models for performing question-answering (QnA) on audio scene, which contains Automatic Speech Recognition (ASR) and Text-to-Speech (TTS). The following is the piepline for evaluating the ASR accuracy.
## Dataset
We evaluate the ASR accuracy on the test set of librispeech [dataset](https://huggingface.co/datasets/andreagasparini/librispeech_test_only), which contains 2620 records of audio and texts.
## Metrics
We evaluate the WER (Word Error Rate) metric of the ASR microservice.
## Evaluation
### Launch ASR microservice
Launch the ASR microserice with the following commands. For more details please refer to [doc](https://github.com/opea-project/GenAIComps/tree/main/comps/asr/whisper/README.md).
```bash
git clone https://github.com/opea-project/GenAIComps
cd GenAIComps
docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/Dockerfile .
# change the name of model by editing model_name_or_path you want to evaluate
docker run -p 7066:7066 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/whisper:latest --model_name_or_path "openai/whisper-tiny"
```
### Evaluate
Install dependencies:
```
pip install -r requirements.txt
```
Evaluate the performance with the LLM:
```py
# validate the offline model
# python offline_evaluate.py
# validate the online asr microservice accuracy
python online_evaluate.py
```
### Performance Result
Here is the tested result for your reference
|| WER |
| --- | ---- |
|whisper-large-v2| 2.87|
|whisper-large| 2.7 |
|whisper-medium| 3.45 |

View File

@@ -0,0 +1,35 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import torch
from datasets import load_dataset
from evaluate import load
from transformers import WhisperForConditionalGeneration, WhisperProcessor
device = "cuda" if torch.cuda.is_available() else "cpu"
MODEL_NAME = "openai/whisper-large-v2"
librispeech_test_clean = load_dataset(
"andreagasparini/librispeech_test_only", "clean", split="test", trust_remote_code=True
)
processor = WhisperProcessor.from_pretrained(MODEL_NAME)
model = WhisperForConditionalGeneration.from_pretrained(MODEL_NAME).to(device)
def map_to_pred(batch):
audio = batch["audio"]
input_features = processor(audio["array"], sampling_rate=audio["sampling_rate"], return_tensors="pt").input_features
batch["reference"] = processor.tokenizer._normalize(batch["text"])
with torch.no_grad():
predicted_ids = model.generate(input_features.to(device))[0]
transcription = processor.decode(predicted_ids)
batch["prediction"] = processor.tokenizer._normalize(transcription)
return batch
result = librispeech_test_clean.map(map_to_pred)
wer = load("wer")
print(100 * wer.compute(references=result["reference"], predictions=result["prediction"]))

View File

@@ -0,0 +1,56 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import base64
import json
import requests
import torch
from datasets import load_dataset
from evaluate import load
from pydub import AudioSegment
from transformers import WhisperForConditionalGeneration, WhisperProcessor
MODEL_NAME = "openai/whisper-large-v2"
processor = WhisperProcessor.from_pretrained(MODEL_NAME)
librispeech_test_clean = load_dataset(
"andreagasparini/librispeech_test_only", "clean", split="test", trust_remote_code=True
)
def map_to_pred(batch):
batch["reference"] = processor.tokenizer._normalize(batch["text"])
file_path = batch["file"]
# process the file_path
pidx = file_path.rfind("/")
sidx = file_path.rfind(".")
file_path_prefix = file_path[: pidx + 1]
file_path_suffix = file_path[sidx:]
file_path_mid = file_path[pidx + 1 : sidx]
splits = file_path_mid.split("-")
file_path_mid = f"LibriSpeech/test-clean/{splits[0]}/{splits[1]}/{file_path_mid}"
file_path = file_path_prefix + file_path_mid + file_path_suffix
audio = AudioSegment.from_file(file_path)
audio.export("tmp.wav")
with open("tmp.wav", "rb") as f:
test_audio_base64_str = base64.b64encode(f.read()).decode("utf-8")
inputs = {"audio": test_audio_base64_str}
endpoint = "http://localhost:7066/v1/asr"
response = requests.post(url=endpoint, data=json.dumps(inputs), proxies={"http": None})
result_str = response.json()["asr_result"]
batch["prediction"] = processor.tokenizer._normalize(result_str)
return batch
result = librispeech_test_clean.map(map_to_pred)
wer = load("wer")
print(100 * wer.compute(references=result["reference"], predictions=result["prediction"]))

View File

@@ -0,0 +1,8 @@
datasets
evaluate
jiwer
librosa
pydub
soundfile
torch
transformers

View File

@@ -0,0 +1,135 @@
# Build Mega Service of AudioQnA on Xeon
This document outlines the deployment process for a AudioQnA application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline on Intel Xeon server.
## 🚀 Build Docker images
### 1. Source Code install GenAIComps
```bash
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps
```
### 2. Build ASR Image
```bash
docker build -t opea/whisper:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/dependency/Dockerfile .
docker build -t opea/asr:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/Dockerfile .
```
### 3. Build LLM Image
```bash
docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
```
### 4. Build TTS Image
```bash
docker build -t opea/speecht5:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/dependency/Dockerfile .
docker build -t opea/tts:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/Dockerfile .
```
### 6. Build MegaService Docker Image
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `audioqna.py` Python script. Build the MegaService Docker image using the command below:
```bash
git clone https://github.com/opea-project/GenAIExamples.git
cd GenAIExamples/AudioQnA/
docker build --no-cache -t opea/audioqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
```
Then run the command `docker images`, you will have following images ready:
1. `opea/whisper:latest`
2. `opea/asr:latest`
3. `opea/llm-tgi:latest`
4. `opea/speecht5:latest`
5. `opea/tts:latest`
6. `opea/audioqna:latest`
## 🚀 Set the environment variables
Before starting the services with `docker compose`, you have to recheck the following environment variables.
```bash
export host_ip=<your External Public IP> # export host_ip=$(hostname -I | awk '{print $1}')
export HUGGINGFACEHUB_API_TOKEN=<your HF token>
export TGI_LLM_ENDPOINT=http://$host_ip:3006
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
export ASR_ENDPOINT=http://$host_ip:7066
export TTS_ENDPOINT=http://$host_ip:7055
export MEGA_SERVICE_HOST_IP=${host_ip}
export ASR_SERVICE_HOST_IP=${host_ip}
export TTS_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export ASR_SERVICE_PORT=3001
export TTS_SERVICE_PORT=3002
export LLM_SERVICE_PORT=3007
```
## 🚀 Start the MegaService
```bash
cd GenAIExamples/AudioQnA/docker_compose/intel/cpu/xeon/
docker compose up -d
```
## 🚀 Test MicroServices
```bash
# whisper service
curl http://${host_ip}:7066/v1/asr \
-X POST \
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
-H 'Content-Type: application/json'
# asr microservice
curl http://${host_ip}:3001/v1/audio/transcriptions \
-X POST \
-d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
-H 'Content-Type: application/json'
# tgi service
curl http://${host_ip}:3006/generate \
-X POST \
-d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
-H 'Content-Type: application/json'
# llm microservice
curl http://${host_ip}:3007/v1/chat/completions\
-X POST \
-d '{"query":"What is Deep Learning?","max_tokens":17,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":false}' \
-H 'Content-Type: application/json'
# speecht5 service
curl http://${host_ip}:7055/v1/tts \
-X POST \
-d '{"text": "Who are you?"}' \
-H 'Content-Type: application/json'
# tts microservice
curl http://${host_ip}:3002/v1/audio/speech \
-X POST \
-d '{"text": "Who are you?"}' \
-H 'Content-Type: application/json'
```
## 🚀 Test MegaService
```bash
curl http://${host_ip}:3008/v1/audioqna \
-X POST \
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' \
-H 'Content-Type: application/json'
```

View File

@@ -0,0 +1,97 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
whisper-service:
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
container_name: whisper-service
ports:
- "7066:7066"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
restart: unless-stopped
asr:
image: ${REGISTRY:-opea}/asr:${TAG:-latest}
container_name: asr-service
ports:
- "3001:9099"
ipc: host
environment:
ASR_ENDPOINT: ${ASR_ENDPOINT}
speecht5-service:
image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
container_name: speecht5-service
ports:
- "7055:7055"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
restart: unless-stopped
tts:
image: ${REGISTRY:-opea}/tts:${TAG:-latest}
container_name: tts-service
ports:
- "3002:9088"
ipc: host
environment:
TTS_ENDPOINT: ${TTS_ENDPOINT}
tgi-service:
image: ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu
container_name: tgi-service
ports:
- "3006:80"
volumes:
- "./data:/data"
shm_size: 1g
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HF_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
command: --model-id ${LLM_MODEL_ID} --cuda-graphs 0
llm:
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
container_name: llm-tgi-server
depends_on:
- tgi-service
ports:
- "3007:9000"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
restart: unless-stopped
audioqna-xeon-backend-server:
image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
container_name: audioqna-xeon-backend-server
depends_on:
- asr
- llm
- tts
ports:
- "3008:8888"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
- LLM_SERVICE_PORT=${LLM_SERVICE_PORT}
- TTS_SERVICE_HOST_IP=${TTS_SERVICE_HOST_IP}
- TTS_SERVICE_PORT=${TTS_SERVICE_PORT}
ipc: host
restart: always
networks:
default:
driver: bridge

View File

@@ -0,0 +1,135 @@
# Build Mega Service of AudioQnA on Gaudi
This document outlines the deployment process for a AudioQnA application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline on Intel Gaudi server.
## 🚀 Build Docker images
### 1. Source Code install GenAIComps
```bash
git clone https://github.com/opea-project/GenAIComps.git
cd GenAIComps
```
### 2. Build ASR Image
```bash
docker build -t opea/whisper-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/dependency/Dockerfile.intel_hpu .
docker build -t opea/asr:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/asr/whisper/Dockerfile .
```
### 3. Build LLM Image
```bash
docker build --no-cache -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile .
```
### 4. Build TTS Image
```bash
docker build -t opea/speecht5-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/dependency/Dockerfile.intel_hpu .
docker build -t opea/tts:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/Dockerfile .
```
### 6. Build MegaService Docker Image
To construct the Mega Service, we utilize the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline within the `audioqna.py` Python script. Build the MegaService Docker image using the command below:
```bash
git clone https://github.com/opea-project/GenAIExamples.git
cd GenAIExamples/AudioQnA/
docker build --no-cache -t opea/audioqna:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
```
Then run the command `docker images`, you will have following images ready:
1. `opea/whisper-gaudi:latest`
2. `opea/asr:latest`
3. `opea/llm-tgi:latest`
4. `opea/speecht5-gaudi:latest`
5. `opea/tts:latest`
6. `opea/audioqna:latest`
## 🚀 Set the environment variables
Before starting the services with `docker compose`, you have to recheck the following environment variables.
```bash
export host_ip=<your External Public IP> # export host_ip=$(hostname -I | awk '{print $1}')
export HUGGINGFACEHUB_API_TOKEN=<your HF token>
export TGI_LLM_ENDPOINT=http://$host_ip:3006
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
export ASR_ENDPOINT=http://$host_ip:7066
export TTS_ENDPOINT=http://$host_ip:7055
export MEGA_SERVICE_HOST_IP=${host_ip}
export ASR_SERVICE_HOST_IP=${host_ip}
export TTS_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export ASR_SERVICE_PORT=3001
export TTS_SERVICE_PORT=3002
export LLM_SERVICE_PORT=3007
```
## 🚀 Start the MegaService
```bash
cd GenAIExamples/AudioQnA/docker_compose/intel/hpu/gaudi/
docker compose up -d
```
## 🚀 Test MicroServices
```bash
# whisper service
curl http://${host_ip}:7066/v1/asr \
-X POST \
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
-H 'Content-Type: application/json'
# asr microservice
curl http://${host_ip}:3001/v1/audio/transcriptions \
-X POST \
-d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA"}' \
-H 'Content-Type: application/json'
# tgi service
curl http://${host_ip}:3006/generate \
-X POST \
-d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
-H 'Content-Type: application/json'
# llm microservice
curl http://${host_ip}:3007/v1/chat/completions\
-X POST \
-d '{"query":"What is Deep Learning?","max_tokens":17,"top_k":10,"top_p":0.95,"typical_p":0.95,"temperature":0.01,"repetition_penalty":1.03,"streaming":false}' \
-H 'Content-Type: application/json'
# speecht5 service
curl http://${host_ip}:7055/v1/tts \
-X POST \
-d '{"text": "Who are you?"}' \
-H 'Content-Type: application/json'
# tts microservice
curl http://${host_ip}:3002/v1/audio/speech \
-X POST \
-d '{"text": "Who are you?"}' \
-H 'Content-Type: application/json'
```
## 🚀 Test MegaService
```bash
curl http://${host_ip}:3008/v1/audioqna \
-X POST \
-d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' \
-H 'Content-Type: application/json'
```

View File

@@ -0,0 +1,118 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
whisper-service:
image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
container_name: whisper-service
ports:
- "7066:7066"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HABANA_VISIBLE_DEVICES: all
OMPI_MCA_btl_vader_single_copy_mechanism: none
runtime: habana
cap_add:
- SYS_NICE
restart: unless-stopped
asr:
image: ${REGISTRY:-opea}/asr:${TAG:-latest}
container_name: asr-service
ports:
- "3001:9099"
ipc: host
environment:
ASR_ENDPOINT: ${ASR_ENDPOINT}
speecht5-service:
image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
container_name: speecht5-service
ports:
- "7055:7055"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HABANA_VISIBLE_DEVICES: all
OMPI_MCA_btl_vader_single_copy_mechanism: none
runtime: habana
cap_add:
- SYS_NICE
restart: unless-stopped
tts:
image: ${REGISTRY:-opea}/tts:${TAG:-latest}
container_name: tts-service
ports:
- "3002:9088"
ipc: host
environment:
TTS_ENDPOINT: ${TTS_ENDPOINT}
tgi-service:
image: ghcr.io/huggingface/tgi-gaudi:2.0.5
container_name: tgi-gaudi-server
ports:
- "3006:80"
volumes:
- "./data:/data"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
HUGGING_FACE_HUB_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
HF_HUB_DISABLE_PROGRESS_BARS: 1
HF_HUB_ENABLE_HF_TRANSFER: 0
HABANA_VISIBLE_DEVICES: all
OMPI_MCA_btl_vader_single_copy_mechanism: none
ENABLE_HPU_GRAPH: true
LIMIT_HPU_GRAPH: true
USE_FLASH_ATTENTION: true
FLASH_ATTENTION_RECOMPUTE: true
runtime: habana
cap_add:
- SYS_NICE
ipc: host
command: --model-id ${LLM_MODEL_ID} --max-input-length 1024 --max-total-tokens 2048
llm:
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
container_name: llm-tgi-gaudi-server
depends_on:
- tgi-service
ports:
- "3007:9000"
ipc: host
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
TGI_LLM_ENDPOINT: ${TGI_LLM_ENDPOINT}
HUGGINGFACEHUB_API_TOKEN: ${HUGGINGFACEHUB_API_TOKEN}
restart: unless-stopped
audioqna-gaudi-backend-server:
image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
container_name: audioqna-gaudi-backend-server
depends_on:
- asr
- llm
- tts
ports:
- "3008:8888"
environment:
- no_proxy=${no_proxy}
- https_proxy=${https_proxy}
- http_proxy=${http_proxy}
- MEGA_SERVICE_HOST_IP=${MEGA_SERVICE_HOST_IP}
- ASR_SERVICE_HOST_IP=${ASR_SERVICE_HOST_IP}
- ASR_SERVICE_PORT=${ASR_SERVICE_PORT}
- LLM_SERVICE_HOST_IP=${LLM_SERVICE_HOST_IP}
- LLM_SERVICE_PORT=${LLM_SERVICE_PORT}
- TTS_SERVICE_HOST_IP=${TTS_SERVICE_HOST_IP}
- TTS_SERVICE_PORT=${TTS_SERVICE_PORT}
ipc: host
restart: always
networks:
default:
driver: bridge

View File

@@ -0,0 +1,55 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
services:
audioqna:
build:
args:
http_proxy: ${http_proxy}
https_proxy: ${https_proxy}
no_proxy: ${no_proxy}
context: ../
dockerfile: ./Dockerfile
image: ${REGISTRY:-opea}/audioqna:${TAG:-latest}
whisper-gaudi:
build:
context: GenAIComps
dockerfile: comps/asr/whisper/dependency/Dockerfile.intel_hpu
extends: audioqna
image: ${REGISTRY:-opea}/whisper-gaudi:${TAG:-latest}
whisper:
build:
context: GenAIComps
dockerfile: comps/asr/whisper/dependency/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/whisper:${TAG:-latest}
asr:
build:
context: GenAIComps
dockerfile: comps/asr/whisper/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/asr:${TAG:-latest}
llm-tgi:
build:
context: GenAIComps
dockerfile: comps/llms/text-generation/tgi/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/llm-tgi:${TAG:-latest}
speecht5-gaudi:
build:
context: GenAIComps
dockerfile: comps/tts/speecht5/dependency/Dockerfile.intel_hpu
extends: audioqna
image: ${REGISTRY:-opea}/speecht5-gaudi:${TAG:-latest}
speecht5:
build:
context: GenAIComps
dockerfile: comps/tts/speecht5/dependency/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/speecht5:${TAG:-latest}
tts:
build:
context: GenAIComps
dockerfile: comps/tts/speecht5/Dockerfile
extends: audioqna
image: ${REGISTRY:-opea}/tts:${TAG:-latest}

View File

@@ -0,0 +1,32 @@
# Deploy AudioQnA in a Kubernetes Cluster
> [NOTE]
> The following values must be set before you can deploy:
> HUGGINGFACEHUB_API_TOKEN
> You can also customize the "MODEL_ID" and "model-volume"
## Deploy On Xeon
```
cd GenAIExamples/AudioQnA/kubernetes/intel/cpu/xeon/manifests
export HUGGINGFACEHUB_API_TOKEN="YourOwnToken"
sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" audioqna.yaml
kubectl apply -f audioqna.yaml
```
## Deploy On Gaudi
```
cd GenAIExamples/AudioQnA/kubernetes/intel/hpu/gaudi/manifests
export HUGGINGFACEHUB_API_TOKEN="YourOwnToken"
sed -i "s/insert-your-huggingface-token-here/${HUGGINGFACEHUB_API_TOKEN}/g" audioqna.yaml
kubectl apply -f audioqna.yaml
```
## Verify Services
Make sure all the pods are running, and restart the audioqna-xxxx pod if necessary.
```bash
kubectl get pods
curl http://${host_ip}:3008/v1/audioqna -X POST -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' -H 'Content-Type: application/json'
```

View File

@@ -0,0 +1,74 @@
# Deploy AudioQnA in Kubernetes Cluster on Xeon and Gaudi
This document outlines the deployment process for a AudioQnA application utilizing the [GenAIComps](https://github.com/opea-project/GenAIComps.git) microservice pipeline components on Intel Xeon server and Gaudi machines.
The AudioQnA Service leverages a Kubernetes operator called genai-microservices-connector(GMC). GMC supports connecting microservices to create pipelines based on the specification in the pipeline yaml file in addition to allowing the user to dynamically control which model is used in a service such as an LLM or embedder. The underlying pipeline language also supports using external services that may be running in public or private cloud elsewhere.
Install GMC in your Kubernetes cluster, if you have not already done so, by following the steps in Section "Getting Started" at [GMC Install](https://github.com/opea-project/GenAIInfra/tree/main/microservices-connector/README.md). Soon as we publish images to Docker Hub, at which point no builds will be required, simplifying install.
The AudioQnA application is defined as a Custom Resource (CR) file that the above GMC operator acts upon. It first checks if the microservices listed in the CR yaml file are running, if not starts them and then proceeds to connect them. When the AudioQnA pipeline is ready, the service endpoint details are returned, letting you use the application. Should you use "kubectl get pods" commands you will see all the component microservices, in particular `asr`, `tts`, and `llm`.
## Using prebuilt images
The AudioQnA uses the below prebuilt images if you choose a Xeon deployment
- tgi-service: ghcr.io/huggingface/text-generation-inference:1.4
- llm: opea/llm-tgi:latest
- asr: opea/asr:latest
- whisper: opea/whisper:latest
- tts: opea/tts:latest
- speecht5: opea/speecht5:latest
Should you desire to use the Gaudi accelerator, two alternate images are used for the embedding and llm services.
For Gaudi:
- tgi-service: ghcr.io/huggingface/tgi-gaudi:2.0.5
- whisper-gaudi: opea/whisper-gaudi:latest
- speecht5-gaudi: opea/speecht5-gaudi:latest
> [NOTE]
> Please refer to [Xeon README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker_compose/intel/cpu/xeon/README.md) or [Gaudi README](https://github.com/opea-project/GenAIExamples/blob/main/AudioQnA/docker_compose/intel/hpu/gaudi/README.md) to build the OPEA images. These too will be available on Docker Hub soon to simplify use.
## Deploy AudioQnA pipeline
This involves deploying the AudioQnA custom resource. You can use audioQnA_xeon.yaml or if you have a Gaudi cluster, you could use audioQnA_gaudi.yaml.
1. Create namespace and deploy application
```sh
kubectl create ns audioqa
kubectl apply -f $(pwd)/audioQnA_xeon.yaml
```
2. GMC will reconcile the AudioQnA custom resource and get all related components/services ready. Check if the service up.
```sh
kubectl get service -n audioqa
```
3. Retrieve the application access URL
```sh
kubectl get gmconnectors.gmc.opea.io -n audioqa
NAME URL READY AGE
audioqa http://router-service.audioqa.svc.cluster.local:8080 6/0/6 5m
```
4. Deploy a client pod to test the application
```sh
kubectl create deployment client-test -n audioqa --image=python:3.8.13 -- sleep infinity
```
5. Access the application using the above URL from the client pod
```sh
export CLIENT_POD=$(kubectl get pod -n audioqa -l app=client-test -o jsonpath={.items..metadata.name})
export accessUrl=$(kubectl get gmc -n audioqa -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
kubectl exec "$CLIENT_POD" -n audioqa -- curl -s --no-buffer $accessUrl -X POST -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json'
```
> [NOTE]
You can remove your AudioQnA pipeline by executing standard Kubernetes kubectl commands to remove a custom resource. Verify it was removed by executing kubectl get pods in the audioqa namespace.

View File

@@ -0,0 +1,58 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
apiVersion: gmc.opea.io/v1alpha3
kind: GMConnector
metadata:
labels:
app.kubernetes.io/name: gmconnector
app.kubernetes.io/managed-by: kustomize
gmc/platform: xeon
name: audioqa
namespace: audioqa
spec:
routerConfig:
name: router
serviceName: router-service
nodes:
root:
routerType: Sequence
steps:
- name: Asr
internalService:
serviceName: asr-svc
config:
endpoint: /v1/audio/transcriptions
ASR_ENDPOINT: whisper-svc
- name: Whisper
internalService:
serviceName: whisper-svc
config:
endpoint: /v1/asr
isDownstreamService: true
- name: Llm
data: $response
internalService:
serviceName: llm-svc
config:
endpoint: /v1/chat/completions
TGI_LLM_ENDPOINT: tgi-svc
- name: Tgi
internalService:
serviceName: tgi-svc
config:
endpoint: /generate
isDownstreamService: true
- name: Tts
data: $response
internalService:
serviceName: tts-svc
config:
endpoint: /v1/audio/speech
TTS_ENDPOINT: speecht5-svc
- name: SpeechT5
internalService:
serviceName: speecht5-svc
config:
endpoint: /v1/tts
isDownstreamService: true

View File

@@ -0,0 +1,395 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
apiVersion: v1
kind: ConfigMap
metadata:
name: audio-qna-config
namespace: default
data:
ASR_ENDPOINT: http://whisper-svc.default.svc.cluster.local:7066
TTS_ENDPOINT: http://speecht5-svc.default.svc.cluster.local:7055
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
TGI_LLM_ENDPOINT: http://llm-dependency-svc.default.svc.cluster.local:3006
MEGA_SERVICE_HOST_IP: audioqna-backend-server-svc
ASR_SERVICE_HOST_IP: asr-svc
ASR_SERVICE_PORT: "3001"
LLM_SERVICE_HOST_IP: llm-svc
LLM_SERVICE_PORT: "3007"
TTS_SERVICE_HOST_IP: tts-svc
TTS_SERVICE_PORT: "3002"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: asr-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: asr-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: asr-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: asr-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/asr:latest
imagePullPolicy: IfNotPresent
name: asr-deploy
args: null
ports:
- containerPort: 9099
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: asr-svc
spec:
type: ClusterIP
selector:
app: asr-deploy
ports:
- name: service
port: 3001
targetPort: 9099
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: whisper-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: whisper-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: whisper-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: whisper-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/whisper:latest
imagePullPolicy: IfNotPresent
name: whisper-deploy
args: null
ports:
- containerPort: 7066
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: whisper-svc
spec:
type: ClusterIP
selector:
app: whisper-deploy
ports:
- name: service
port: 7066
targetPort: 7066
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tts-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: tts-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: tts-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: tts-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/tts:latest
imagePullPolicy: IfNotPresent
name: tts-deploy
args: null
ports:
- containerPort: 9088
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: tts-svc
spec:
type: ClusterIP
selector:
app: tts-deploy
ports:
- name: service
port: 3002
targetPort: 9088
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: speecht5-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: speecht5-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: speecht5-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: speecht5-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/speecht5:latest
imagePullPolicy: IfNotPresent
name: speecht5-deploy
args: null
ports:
- containerPort: 7055
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: speecht5-svc
spec:
type: ClusterIP
selector:
app: speecht5-deploy
ports:
- name: service
port: 7055
targetPort: 7055
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: llm-dependency-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: llm-dependency-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: llm-dependency-deploy
spec:
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: "ghcr.io/huggingface/text-generation-inference:sha-e4201f4-intel-cpu"
name: llm-dependency-deploy-demo
securityContext:
capabilities:
add:
- SYS_NICE
args:
- --model-id
- $(LLM_MODEL_ID)
- --max-input-length
- '2048'
- --max-total-tokens
- '4096'
volumeMounts:
- mountPath: /data
name: model-volume
- mountPath: /dev/shm
name: shm
ports:
- containerPort: 80
serviceAccountName: default
volumes:
- name: model-volume
hostPath:
path: /home/sdp/cesg
type: Directory
- name: shm
emptyDir:
medium: Memory
sizeLimit: 1Gi
---
kind: Service
apiVersion: v1
metadata:
name: llm-dependency-svc
spec:
type: ClusterIP
selector:
app: llm-dependency-deploy
ports:
- name: service
port: 3006
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: llm-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: llm-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: llm-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: llm-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/llm-tgi:latest
imagePullPolicy: IfNotPresent
name: llm-deploy
args: null
ports:
- containerPort: 9000
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: llm-svc
spec:
type: ClusterIP
selector:
app: llm-deploy
ports:
- name: service
port: 3007
targetPort: 9000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: audioqna-backend-server-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: audioqna-backend-server-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: audioqna-backend-server-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: audioqna-backend-server-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/audioqna:latest
imagePullPolicy: IfNotPresent
name: audioqna-backend-server-deploy
args: null
ports:
- containerPort: 8888
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: audioqna-backend-server-svc
spec:
type: NodePort
selector:
app: audioqna-backend-server-deploy
ports:
- name: service
port: 3008
targetPort: 8888
nodePort: 30666

View File

@@ -0,0 +1,58 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
apiVersion: gmc.opea.io/v1alpha3
kind: GMConnector
metadata:
labels:
app.kubernetes.io/name: gmconnector
app.kubernetes.io/managed-by: kustomize
gmc/platform: gaudi
name: audioqa
namespace: audioqa
spec:
routerConfig:
name: router
serviceName: router-service
nodes:
root:
routerType: Sequence
steps:
- name: Asr
internalService:
serviceName: asr-svc
config:
endpoint: /v1/audio/transcriptions
ASR_ENDPOINT: whisper-gaudi-svc
- name: WhisperGaudi
internalService:
serviceName: whisper-gaudi-svc
config:
endpoint: /v1/asr
isDownstreamService: true
- name: Llm
data: $response
internalService:
serviceName: llm-svc
config:
endpoint: /v1/chat/completions
TGI_LLM_ENDPOINT: tgi-gaudi-svc
- name: TgiGaudi
internalService:
serviceName: tgi-gaudi-svc
config:
endpoint: /generate
isDownstreamService: true
- name: Tts
data: $response
internalService:
serviceName: tts-svc
config:
endpoint: /v1/audio/speech
TTS_ENDPOINT: speecht5-gaudi-svc
- name: SpeechT5Gaudi
internalService:
serviceName: speecht5-gaudi-svc
config:
endpoint: /v1/tts
isDownstreamService: true

View File

@@ -0,0 +1,447 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
apiVersion: v1
kind: ConfigMap
metadata:
name: audio-qna-config
namespace: default
data:
ASR_ENDPOINT: http://whisper-svc.default.svc.cluster.local:7066
TTS_ENDPOINT: http://speecht5-svc.default.svc.cluster.local:7055
LLM_MODEL_ID: Intel/neural-chat-7b-v3-3
HUGGINGFACEHUB_API_TOKEN: "insert-your-huggingface-token-here"
TGI_LLM_ENDPOINT: http://llm-dependency-svc.default.svc.cluster.local:3006
MEGA_SERVICE_HOST_IP: audioqna-backend-server-svc
ASR_SERVICE_HOST_IP: asr-svc
ASR_SERVICE_PORT: "3001"
LLM_SERVICE_HOST_IP: llm-svc
LLM_SERVICE_PORT: "3007"
TTS_SERVICE_HOST_IP: tts-svc
TTS_SERVICE_PORT: "3002"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: asr-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: asr-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: asr-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: asr-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/asr:latest
imagePullPolicy: IfNotPresent
name: asr-deploy
args: null
ports:
- containerPort: 9099
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: asr-svc
spec:
type: ClusterIP
selector:
app: asr-deploy
ports:
- name: service
port: 3001
targetPort: 9099
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: whisper-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: whisper-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: whisper-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: whisper-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/whisper-gaudi:latest
imagePullPolicy: IfNotPresent
name: whisper-deploy
args: null
ports:
- containerPort: 7066
resources:
limits:
habana.ai/gaudi: 1
env:
- name: OMPI_MCA_btl_vader_single_copy_mechanism
value: none
- name: PT_HPU_ENABLE_LAZY_COLLECTIVES
value: 'true'
- name: runtime
value: habana
- name: HABANA_VISIBLE_DEVICES
value: all
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: whisper-svc
spec:
type: ClusterIP
selector:
app: whisper-deploy
ports:
- name: service
port: 7066
targetPort: 7066
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tts-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: tts-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: tts-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: tts-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/tts:latest
imagePullPolicy: IfNotPresent
name: tts-deploy
args: null
ports:
- containerPort: 9088
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: tts-svc
spec:
type: ClusterIP
selector:
app: tts-deploy
ports:
- name: service
port: 3002
targetPort: 9088
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: speecht5-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: speecht5-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: speecht5-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: speecht5-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/speecht5-gaudi:latest
imagePullPolicy: IfNotPresent
name: speecht5-deploy
args: null
ports:
- containerPort: 7055
resources:
limits:
habana.ai/gaudi: 1
env:
- name: OMPI_MCA_btl_vader_single_copy_mechanism
value: none
- name: PT_HPU_ENABLE_LAZY_COLLECTIVES
value: 'true'
- name: runtime
value: habana
- name: HABANA_VISIBLE_DEVICES
value: all
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: speecht5-svc
spec:
type: ClusterIP
selector:
app: speecht5-deploy
ports:
- name: service
port: 7055
targetPort: 7055
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: llm-dependency-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: llm-dependency-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: llm-dependency-deploy
spec:
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: ghcr.io/huggingface/tgi-gaudi:2.0.5
name: llm-dependency-deploy-demo
securityContext:
capabilities:
add:
- SYS_NICE
args:
- --model-id
- $(LLM_MODEL_ID)
- --max-input-length
- '2048'
- --max-total-tokens
- '4096'
- --max-batch-total-tokens
- '65536'
- --max-batch-prefill-tokens
- '4096'
volumeMounts:
- mountPath: /data
name: model-volume
- mountPath: /dev/shm
name: shm
ports:
- containerPort: 80
resources:
limits:
habana.ai/gaudi: 1
env:
- name: OMPI_MCA_btl_vader_single_copy_mechanism
value: none
- name: PT_HPU_ENABLE_LAZY_COLLECTIVES
value: 'true'
- name: ENABLE_HPU_GRAPH
value: 'true'
- name: LIMIT_HPU_GRAPH
value: 'true'
- name: USE_FLASH_ATTENTION
value: 'true'
- name: FLASH_ATTENTION_RECOMPUTE
value: 'true'
- name: runtime
value: habana
- name: HABANA_VISIBLE_DEVICES
value: all
- name: PREFILL_BATCH_BUCKET_SIZE
value: "1"
- name: BATCH_BUCKET_SIZE
value: "8"
serviceAccountName: default
volumes:
- name: model-volume
hostPath:
path: /mnt/models
type: Directory
- name: shm
emptyDir:
medium: Memory
sizeLimit: 1Gi
---
kind: Service
apiVersion: v1
metadata:
name: llm-dependency-svc
spec:
type: ClusterIP
selector:
app: llm-dependency-deploy
ports:
- name: service
port: 3006
targetPort: 80
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: llm-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: llm-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: llm-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: llm-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/llm-tgi:latest
imagePullPolicy: IfNotPresent
name: llm-deploy
args: null
ports:
- containerPort: 9000
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: llm-svc
spec:
type: ClusterIP
selector:
app: llm-deploy
ports:
- name: service
port: 3007
targetPort: 9000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: audioqna-backend-server-deploy
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: audioqna-backend-server-deploy
template:
metadata:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: 'true'
labels:
app: audioqna-backend-server-deploy
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: ScheduleAnyway
labelSelector:
matchLabels:
app: audioqna-backend-server-deploy
hostIPC: true
containers:
- envFrom:
- configMapRef:
name: audio-qna-config
image: opea/audioqna:latest
imagePullPolicy: IfNotPresent
name: audioqna-backend-server-deploy
args: null
ports:
- containerPort: 8888
serviceAccountName: default
---
kind: Service
apiVersion: v1
metadata:
name: audioqna-backend-server-svc
spec:
type: NodePort
selector:
app: audioqna-backend-server-deploy
ports:
- name: service
port: 3008
targetPort: 8888
nodePort: 30666

View File

@@ -0,0 +1,138 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
export REGISTRY=${IMAGE_REPO}
export TAG=${IMAGE_TAG}
WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')
function build_docker_images() {
cd $WORKPATH/docker_image_build
git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="audioqna whisper-gaudi asr llm-tgi speecht5-gaudi tts"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
docker pull ghcr.io/huggingface/tgi-gaudi:2.0.5
docker images && sleep 1s
}
function start_services() {
cd $WORKPATH/docker_compose/intel/hpu/gaudi
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export TGI_LLM_ENDPOINT=http://$ip_address:3006
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
export ASR_ENDPOINT=http://$ip_address:7066
export TTS_ENDPOINT=http://$ip_address:7055
export MEGA_SERVICE_HOST_IP=${ip_address}
export ASR_SERVICE_HOST_IP=${ip_address}
export TTS_SERVICE_HOST_IP=${ip_address}
export LLM_SERVICE_HOST_IP=${ip_address}
export ASR_SERVICE_PORT=3001
export TTS_SERVICE_PORT=3002
export LLM_SERVICE_PORT=3007
# sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env
# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
n=0
until [[ "$n" -ge 100 ]]; do
docker logs tgi-gaudi-server > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
n=0
until [[ "$n" -ge 100 ]]; do
docker logs whisper-service > $LOG_PATH/whisper_service_start.log
if grep -q "Uvicorn server setup on port" $LOG_PATH/whisper_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
}
function validate_megaservice() {
result=$(http_proxy="" curl http://${ip_address}:3008/v1/audioqna -XPOST -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' -H 'Content-Type: application/json')
echo "result is === $result"
if [[ $result == *"AAA"* ]]; then
echo "Result correct."
else
docker logs whisper-service > $LOG_PATH/whisper-service.log
docker logs asr-service > $LOG_PATH/asr-service.log
docker logs speecht5-service > $LOG_PATH/tts-service.log
docker logs tts-service > $LOG_PATH/tts-service.log
docker logs tgi-gaudi-server > $LOG_PATH/tgi-gaudi-server.log
docker logs llm-tgi-gaudi-server > $LOG_PATH/llm-tgi-gaudi-server.log
echo "Result wrong."
exit 1
fi
}
#function validate_frontend() {
# cd $WORKPATH/ui/svelte
# local conda_env_name="OPEA_e2e"
# export PATH=${HOME}/miniforge3/bin/:$PATH
## conda remove -n ${conda_env_name} --all -y
## conda create -n ${conda_env_name} python=3.12 -y
# source activate ${conda_env_name}
#
# sed -i "s/localhost/$ip_address/g" playwright.config.ts
#
## conda install -c conda-forge nodejs -y
# npm install && npm ci && npx playwright install --with-deps
# node -v && npm -v && pip list
#
# exit_status=0
# npx playwright test || exit_status=$?
#
# if [ $exit_status -ne 0 ]; then
# echo "[TEST INFO]: ---------frontend test failed---------"
# exit $exit_status
# else
# echo "[TEST INFO]: ---------frontend test passed---------"
# fi
#}
function stop_docker() {
cd $WORKPATH/docker_compose/intel/hpu/gaudi
docker compose stop && docker compose rm -f
}
function main() {
stop_docker
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
start_services
# validate_microservices
validate_megaservice
# validate_frontend
stop_docker
echo y | docker system prune
}
main

View File

@@ -0,0 +1,127 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -e
IMAGE_REPO=${IMAGE_REPO:-"opea"}
IMAGE_TAG=${IMAGE_TAG:-"latest"}
echo "REGISTRY=IMAGE_REPO=${IMAGE_REPO}"
echo "TAG=IMAGE_TAG=${IMAGE_TAG}"
export REGISTRY=${IMAGE_REPO}
export TAG=${IMAGE_TAG}
WORKPATH=$(dirname "$PWD")
LOG_PATH="$WORKPATH/tests"
ip_address=$(hostname -I | awk '{print $1}')
function build_docker_images() {
cd $WORKPATH/docker_image_build
git clone https://github.com/opea-project/GenAIComps.git && cd GenAIComps && git checkout "${opea_branch:-"main"}" && cd ../
echo "Build all the images with --no-cache, check docker_image_build.log for details..."
service_list="audioqna whisper asr llm-tgi speecht5 tts"
docker compose -f build.yaml build ${service_list} --no-cache > ${LOG_PATH}/docker_image_build.log
docker pull ghcr.io/huggingface/tgi-gaudi:2.0.5
docker images && sleep 1s
}
function start_services() {
cd $WORKPATH/docker_compose/intel/cpu/xeon/
export HUGGINGFACEHUB_API_TOKEN=${HUGGINGFACEHUB_API_TOKEN}
export TGI_LLM_ENDPOINT=http://$ip_address:3006
export LLM_MODEL_ID=Intel/neural-chat-7b-v3-3
export ASR_ENDPOINT=http://$ip_address:7066
export TTS_ENDPOINT=http://$ip_address:7055
export MEGA_SERVICE_HOST_IP=${ip_address}
export ASR_SERVICE_HOST_IP=${ip_address}
export TTS_SERVICE_HOST_IP=${ip_address}
export LLM_SERVICE_HOST_IP=${ip_address}
export ASR_SERVICE_PORT=3001
export TTS_SERVICE_PORT=3002
export LLM_SERVICE_PORT=3007
# sed -i "s/backend_address/$ip_address/g" $WORKPATH/ui/svelte/.env
# Start Docker Containers
docker compose up -d > ${LOG_PATH}/start_services_with_compose.log
n=0
until [[ "$n" -ge 100 ]]; do
docker logs tgi-service > $LOG_PATH/tgi_service_start.log
if grep -q Connected $LOG_PATH/tgi_service_start.log; then
break
fi
sleep 5s
n=$((n+1))
done
}
function validate_megaservice() {
result=$(http_proxy="" curl http://${ip_address}:3008/v1/audioqna -XPOST -d '{"audio": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "max_tokens":64}' -H 'Content-Type: application/json')
echo $result
if [[ $result == *"AAA"* ]]; then
echo "Result correct."
else
docker logs whisper-service > $LOG_PATH/whisper-service.log
docker logs asr-service > $LOG_PATH/asr-service.log
docker logs speecht5-service > $LOG_PATH/tts-service.log
docker logs tts-service > $LOG_PATH/tts-service.log
docker logs tgi-service > $LOG_PATH/tgi-service.log
docker logs llm-tgi-server > $LOG_PATH/llm-tgi-server.log
docker logs audioqna-xeon-backend-server > $LOG_PATH/audioqna-xeon-backend-server.log
echo "Result wrong."
exit 1
fi
}
#function validate_frontend() {
# cd $WORKPATH/ui/svelte
# local conda_env_name="OPEA_e2e"
# export PATH=${HOME}/miniforge3/bin/:$PATH
## conda remove -n ${conda_env_name} --all -y
## conda create -n ${conda_env_name} python=3.12 -y
# source activate ${conda_env_name}
#
# sed -i "s/localhost/$ip_address/g" playwright.config.ts
#
## conda install -c conda-forge nodejs -y
# npm install && npm ci && npx playwright install --with-deps
# node -v && npm -v && pip list
#
# exit_status=0
# npx playwright test || exit_status=$?
#
# if [ $exit_status -ne 0 ]; then
# echo "[TEST INFO]: ---------frontend test failed---------"
# exit $exit_status
# else
# echo "[TEST INFO]: ---------frontend test passed---------"
# fi
#}
function stop_docker() {
cd $WORKPATH/docker_compose/intel/cpu/xeon/
docker compose stop && docker compose rm -f
}
function main() {
stop_docker
if [[ "$IMAGE_REPO" == "opea" ]]; then build_docker_images; fi
start_services
validate_megaservice
# validate_frontend
stop_docker
echo y | docker system prune
}
main

View File

@@ -0,0 +1,111 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -xe
USER_ID=$(whoami)
LOG_PATH=/home/$(whoami)/logs
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
IMAGE_REPO=${IMAGE_REPO:-}
function install_audioqa() {
kubectl create ns $APP_NAMESPACE
sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g" ./audioQnA_gaudi.yaml
kubectl apply -f ./audioQnA_gaudi.yaml
# Wait until the router service is ready
echo "Waiting for the audioqa router service to be ready..."
wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
output=$(kubectl get pods -n $APP_NAMESPACE)
echo $output
}
function validate_audioqa() {
# deploy client pod for testing
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
# wait for client pod ready
wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
# giving time to populating data
sleep 60
kubectl get pods -n $APP_NAMESPACE
# send request to audioqa
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
echo "$CLIENT_POD"
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
echo "$byte_str" > $LOG_PATH/curl_audioqa.log
if [ -z "$byte_str" ]; then
echo "audioqa failed, please check the logs in ${LOG_PATH}!"
exit 1
fi
echo "Audioqa response check succeed!"
}
function wait_until_pod_ready() {
echo "Waiting for the $1 to be ready..."
max_retries=30
retry_count=0
while ! is_pod_ready $2 $3; do
if [ $retry_count -ge $max_retries ]; then
echo "$1 is not ready after waiting for a significant amount of time"
get_gmc_controller_logs
exit 1
fi
echo "$1 is not ready yet. Retrying in 10 seconds..."
sleep 10
output=$(kubectl get pods -n $2)
echo $output
retry_count=$((retry_count + 1))
done
}
function is_pod_ready() {
if [ "$2" == "gmc-controller" ]; then
pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
else
pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
fi
if [ "$pod_status" == "True" ]; then
return 0
else
return 1
fi
}
function get_gmc_controller_logs() {
# Fetch the name of the pod with the app-name gmc-controller in the specified namespace
pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
# Check if the pod name was found
if [ -z "$pod_name" ]; then
echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
return 1
fi
# Get the logs of the found pod
echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
kubectl logs $pod_name -n $SYSTEM_NAMESPACE
}
if [ $# -eq 0 ]; then
echo "Usage: $0 <function_name>"
exit 1
fi
case "$1" in
install_AudioQnA)
pushd AudioQnA/kubernetes/intel/hpu/gaudi/gmc
install_audioqa
popd
;;
validate_AudioQnA)
pushd AudioQnA/kubernetes/intel/hpu/gaudi/gmc
validate_audioqa
popd
;;
*)
echo "Unknown function: $1"
;;
esac

View File

@@ -0,0 +1,111 @@
#!/bin/bash
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
set -xe
USER_ID=$(whoami)
LOG_PATH=/home/$(whoami)/logs
MOUNT_DIR=/home/$USER_ID/.cache/huggingface/hub
IMAGE_REPO=${IMAGE_REPO:-}
function install_audioqa() {
kubectl create ns $APP_NAMESPACE
sed -i "s|namespace: audioqa|namespace: $APP_NAMESPACE|g" ./audioQnA_xeon.yaml
kubectl apply -f ./audioQnA_xeon.yaml
# Wait until the router service is ready
echo "Waiting for the audioqa router service to be ready..."
wait_until_pod_ready "audioqa router" $APP_NAMESPACE "router-service"
output=$(kubectl get pods -n $APP_NAMESPACE)
echo $output
}
function validate_audioqa() {
# deploy client pod for testing
kubectl create deployment client-test -n $APP_NAMESPACE --image=python:3.8.13 -- sleep infinity
# wait for client pod ready
wait_until_pod_ready "client-test" $APP_NAMESPACE "client-test"
# giving time to populating data
sleep 60
kubectl get pods -n $APP_NAMESPACE
# send request to audioqa
export CLIENT_POD=$(kubectl get pod -n $APP_NAMESPACE -l app=client-test -o jsonpath={.items..metadata.name})
echo "$CLIENT_POD"
accessUrl=$(kubectl get gmc -n $APP_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
byte_str=$(kubectl exec "$CLIENT_POD" -n $APP_NAMESPACE -- curl $accessUrl -s -X POST -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
echo "$byte_str" > $LOG_PATH/curl_audioqa.log
if [ -z "$byte_str" ]; then
echo "audioqa failed, please check the logs in ${LOG_PATH}!"
exit 1
fi
echo "Audioqa response check succeed!"
}
function wait_until_pod_ready() {
echo "Waiting for the $1 to be ready..."
max_retries=30
retry_count=0
while ! is_pod_ready $2 $3; do
if [ $retry_count -ge $max_retries ]; then
echo "$1 is not ready after waiting for a significant amount of time"
get_gmc_controller_logs
exit 1
fi
echo "$1 is not ready yet. Retrying in 10 seconds..."
sleep 10
output=$(kubectl get pods -n $2)
echo $output
retry_count=$((retry_count + 1))
done
}
function is_pod_ready() {
if [ "$2" == "gmc-controller" ]; then
pod_status=$(kubectl get pods -n $1 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
else
pod_status=$(kubectl get pods -n $1 -l app=$2 -o jsonpath='{.items[].status.conditions[?(@.type=="Ready")].status}')
fi
if [ "$pod_status" == "True" ]; then
return 0
else
return 1
fi
}
function get_gmc_controller_logs() {
# Fetch the name of the pod with the app-name gmc-controller in the specified namespace
pod_name=$(kubectl get pods -n $SYSTEM_NAMESPACE -l control-plane=gmc-controller -o jsonpath='{.items[0].metadata.name}')
# Check if the pod name was found
if [ -z "$pod_name" ]; then
echo "No pod found with app-name gmc-controller in namespace $SYSTEM_NAMESPACE"
return 1
fi
# Get the logs of the found pod
echo "Fetching logs for pod $pod_name in namespace $SYSTEM_NAMESPACE..."
kubectl logs $pod_name -n $SYSTEM_NAMESPACE
}
if [ $# -eq 0 ]; then
echo "Usage: $0 <function_name>"
exit 1
fi
case "$1" in
install_AudioQnA)
pushd AudioQnA/kubernetes/intel/cpu/xeon/gmc
install_audioqa
popd
;;
validate_AudioQnA)
pushd AudioQnA/kubernetes/intel/cpu/xeon/gmc
validate_audioqa
popd
;;
*)
echo "Unknown function: $1"
;;
esac

2
AudioQnA/ui/svelte/.env Normal file
View File

@@ -0,0 +1,2 @@
CHAT_URL = 'http://backend_address:3008/v1/audioqna'

View File

@@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
plugins: ["svelte3", "@typescript-eslint", "neverthrow"],
ignorePatterns: ["*.cjs"],
overrides: [{ files: ["*.svelte"], processor: "svelte3/svelte3" }],
settings: {
"svelte3/typescript": () => require("typescript"),
},
parserOptions: {
sourceType: "module",
ecmaVersion: 2020,
},
env: {
browser: true,
es2017: true,
node: true,
},
};

View File

@@ -0,0 +1,29 @@
# AudioQnA
## 📸 Project Screenshots
![project-screenshot](../../assets/img/audio_ui.png)
![project-screenshot](../../assets/img/audio_ui_record.png)
## 🧐 Features
Here're some of the project's features:
- Start a Talking ChatInitiate voice chat, able to input voice content, and customize the conversation sound based on the uploaded file.
- Scroll to Bottom: The chat automatically slides to the bottom.
## 🛠️ Get it Running
1. Clone the repo.
2. cd command to the current folder.
3. Modify the required .env variables.
```
CHAT_URL = ''
```
4. Execute `npm install` to install the corresponding dependencies.
5. Execute `npm run dev` in both environments

View File

@@ -0,0 +1,57 @@
{
"name": "sveltekit-auth-example",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check . && eslint .",
"format": "prettier --write ."
},
"devDependencies": {
"@fortawesome/free-solid-svg-icons": "6.2.0",
"@sveltejs/adapter-auto": "1.0.0-next.75",
"@sveltejs/kit": "^1.30.4",
"@tailwindcss/typography": "0.5.7",
"@types/debug": "4.1.7",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"autoprefixer": "^10.4.7",
"daisyui": "^3.5.0",
"debug": "4.3.4",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-neverthrow": "1.1.4",
"eslint-plugin-svelte3": "^4.0.0",
"neverthrow": "5.0.0",
"pocketbase": "0.7.0",
"postcss": "^8.4.23",
"postcss-load-config": "^4.0.1",
"postcss-preset-env": "^8.3.2",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.7.0",
"prettier-plugin-tailwindcss": "^0.3.0",
"svelte": "^3.59.1",
"svelte-check": "^2.7.1",
"svelte-fa": "3.0.3",
"svelte-preprocess": "^4.10.7",
"tailwindcss": "^3.1.5",
"ts-pattern": "4.0.5",
"tslib": "^2.3.1",
"typescript": "^4.7.4",
"vite": "^4.3.9"
},
"type": "module",
"dependencies": {
"echarts": "^5.4.2",
"flowbite-svelte": "^0.38.5",
"fuse": "^0.4.0",
"fuse.js": "^6.6.2",
"ramda": "^0.29.0",
"sse.js": "^0.6.1",
"svelte-notifications": "^0.9.98"
}
}

View File

@@ -0,0 +1,13 @@
const tailwindcss = require("tailwindcss");
const autoprefixer = require("autoprefixer");
const config = {
plugins: [
//Some plugins, like tailwindcss/nesting, need to run before Tailwind,
tailwindcss(),
//But others, like autoprefixer, need to run after,
autoprefixer,
],
};
module.exports = config;

Some files were not shown because too many files have changed in this diff Show More