Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
a2afce1
update codetrans default model (#1015)
XinyaoWa Oct 28, 2024
2332d22
[Codegen] Replace codegen default Model to Qwen/Qwen2.5-Coder-7B-Inst…
yao531441 Oct 28, 2024
bc47930
manifest CI: repopulate the failure from inner test script (#1032)
lianhao Oct 28, 2024
fde5996
fix FaqGen accuracy scripts bug (#1039)
XinyaoWa Oct 29, 2024
a3ef260
Add chatqna_wrapper.py along with updated Dockerfile.wrapper. To sup…
sgurunat Oct 29, 2024
1d30bff
ProductivitySuite: Add docker compose files for Intel Gaudi server al…
sgurunat Oct 29, 2024
8ec0f6a
ProductivitySuite UI: Update names of ChatQnA, CodeGen, DocSum to Dig…
sgurunat Oct 29, 2024
6216b5a
ProductivitySuite UI: Update Docsum to have vertical scroll bar if co…
sgurunat Oct 29, 2024
a6e4a7d
ProductivitySuite UI: Remove <|eot_id|> string from the Chat, Docsum …
sgurunat Oct 29, 2024
b999077
ProductivitySuite UI: Update contextWrapper and contextTitle width to…
sgurunat Oct 29, 2024
cf96dcc
ProductivitySuite UI: Show system prompt input field always to edit i…
sgurunat Oct 29, 2024
debdd0f
ProductivitySuite UI: Update max_new_tokens into max_tokens in Conver…
sgurunat Oct 29, 2024
0a5584a
ProductivitySuite UI: Add multiple models support in ChatQnA. Choose …
sgurunat Oct 29, 2024
002f0e2
Update VisualQnA README.md for its workflow (#912)
louie-tsai Oct 30, 2024
960805a
Adding audio and image/video files needed for loading the Gradio UI, …
ctao456 Oct 30, 2024
7197286
Fix ChatQnA manifest default port issue (#1033)
lvliang-intel Oct 30, 2024
4d9b1da
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
594891a
removed langchain related environment variables in ProductivitySuite …
sgurunat Oct 30, 2024
0907b42
removed langchain related environment variables in ProductivitySuite doc
sgurunat Oct 30, 2024
2cd3ea7
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Oct 30, 2024
a65640b
Graph rag (#1007)
rbrugaro Oct 30, 2024
0f5a9c4
Fix ChatQnA manifest test issue on Xeon (#1044)
chensuyue Oct 31, 2024
9d12416
update action for CI (#1050)
chensuyue Oct 31, 2024
c65d7d4
fix vllm output in chatqna (#1038)
XinyaoWa Nov 1, 2024
bf5c391
Add Workflow Executor Example (#892)
JoshuaL3000 Nov 1, 2024
ced68e1
Add performance benchmark scripts for 4 use cases. (#1052)
joshuayao Nov 3, 2024
5eb3d28
Update AgentQnA example for v1.1 release (#885)
minmin-intel Nov 4, 2024
3372b9d
update accuracy embedding endpoint for no wrapper (#1056)
lkk12014402 Nov 4, 2024
0306c62
Update TGI CPU image to latest official release 2.4.0 (#1035)
lvliang-intel Nov 4, 2024
7f7ad0e
Inject commit for the release docker image (#1060)
ZePan110 Nov 4, 2024
78331ee
Add nightly image build and publish action (#1067)
chensuyue Nov 4, 2024
c2b7bd2
Use docker stop instead of docker compose stop to avoid container cle…
chensuyue Nov 4, 2024
cf86ace
Update nightly image build jobs (#1070)
chensuyue Nov 5, 2024
a0921f1
[Doc] Fix broken build instruction (#1063)
xiguiw Nov 5, 2024
2d9aeb3
fix wrong format which break online doc build (#1073)
NeoZhangJianyu Nov 5, 2024
944ae47
[ChatQnA] Fix the service connection issue on GPU and modify the emb …
wangkl2 Nov 6, 2024
2de7c0b
Enhance CI hardware list detect (#1077)
chensuyue Nov 7, 2024
0d3ec68
Merge branch 'main' into multiple-model-with-remote-service
jaswanth8888 Nov 7, 2024
6263b51
[Doc] Add steps to deploy opea services using minikube (#1058)
arcyleung Nov 7, 2024
e9b1645
align vllm hpu version to latest vllm-fork (#1061)
XinyaoWa Nov 7, 2024
1da44d9
Remove debug outputs (#1085)
ZePan110 Nov 7, 2024
4635a92
Make embedding run on CPU for aligning with Gaudi performance benchma…
lvliang-intel Nov 7, 2024
11d8b24
ProductivitySuite: Update TGI CPU image version to 2.4.0 (#1062)
hteeyeoh Nov 8, 2024
fe97e88
Add CI case to check online doc building, not update online doc (#1087)
NeoZhangJianyu Nov 8, 2024
40386d9
remove vllm-on-ray (#1084)
XinyaoWa Nov 8, 2024
4c27a3d
Align faqgen to form input (#1089)
XinyaoWa Nov 8, 2024
dd9623d
Add new image repo clone. (#1093)
ZePan110 Nov 8, 2024
bbc95bb
MultimodalQnA Image and Audio Support Phase 1 (#1071)
mhbuehler Nov 8, 2024
9c3023a
Fix faq ut bug (#1097)
XinyaoWa Nov 8, 2024
c9088eb
Add EdgeCraftRag as a GenAIExample (#1072)
Yongbozzz Nov 8, 2024
e2bdd19
update faqGen ui response (#1091)
WenjiaoYue Nov 8, 2024
ee83a6d
opt CI to skip none MD and RST files (#1098)
NeoZhangJianyu Nov 8, 2024
049517f
Improve the robustness of links check workflow (#1096)
ZePan110 Nov 8, 2024
dfed2ae
Bump gradio from 5.0.0 to 5.5.0 in /MultimodalQnA/ui/gradio (#1080)
dependabot[bot] Nov 8, 2024
edc09ec
ProductivitySuite: Fix typo in README (#1083)
hteeyeoh Nov 8, 2024
f702677
[ChatQnA] Fix the no_proxy setting for gpu example (#1078)
wangkl2 Nov 8, 2024
82801d0
image build bug fix (#1105)
chensuyue Nov 8, 2024
3744bb8
Fix docSum ui error in accessing parsed files (#1079)
WenjiaoYue Nov 11, 2024
aa314f6
[Readme] Update ChatQnA Readme for LLM Endpoint (#1086)
letonghan Nov 11, 2024
a7353bb
Refine performance directory (#1017)
bjzhjing Nov 11, 2024
abd9d12
Fix non stream case (#1115)
Spycsh Nov 11, 2024
e3187be
Update ChatQnA manifests using always pull image policy (#1100)
lvliang-intel Nov 11, 2024
7f6ee31
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 11, 2024
3e4aa57
Updated Dockerfile.wrapper under ChatQnA to clone the git repo instea…
sgurunat Nov 11, 2024
adaa85d
Merge branch 'multiple-model-with-remote-service' of https://github.c…
sgurunat Nov 11, 2024
6f0783e
ProductivitySuite UI: Add model parameter for Codegen so that it work…
sgurunat Nov 11, 2024
46736cc
ProductivitySuite UI: Add model parameter for Docsum so that it works…
sgurunat Nov 11, 2024
740f07a
ProductivitySuite UI: Add model parameter for FaqGen so that it works…
sgurunat Nov 11, 2024
08fd917
Updated compose_remote.yaml file to have vllm instead of tgi. Moved t…
sgurunat Nov 11, 2024
215fa69
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 11, 2024
b0d07f6
ProductivitySuite UI: Updated README of Gaudi docker_compose folder t…
sgurunat Nov 11, 2024
2ace450
Merge branch 'multiple-model-with-remote-service' of https://github.c…
sgurunat Nov 11, 2024
894b13f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 11, 2024
162bd82
ProductivitySuite UI: Deleted README_remote.md file as its contents a…
sgurunat Nov 11, 2024
6ed52b0
Merge branch 'multiple-model-with-remote-service' of https://github.c…
sgurunat Nov 11, 2024
052d3ab
ProductivitySuite UI: Updated LLM_MODEL_ID value in set_env.sh file
sgurunat Nov 11, 2024
461ae9e
ProductivitySuite UI: Deleted set_env_remote.sh file as it is merged …
sgurunat Nov 11, 2024
3bfa45b
ProductivitySuite UI: Update compose.yaml under Gaudi folder with vLL…
sgurunat Nov 11, 2024
16e2c11
ProductivitySuite UI: Removed langchain environment variables in comp…
sgurunat Nov 11, 2024
c88d9d7
ProductivitySuite UI: Delete compose_tgi_remote.yaml file as it is no…
sgurunat Nov 11, 2024
f7a7f8a
Fix typo (#1117)
bjzhjing Nov 12, 2024
96e797e
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 12, 2024
1ff85f6
Upgrade TGI Gaudi version to v2.0.6 (#1088)
lvliang-intel Nov 12, 2024
20908bd
ProductivitySuite UI: Fixed Keycloak path issue
sgurunat Nov 12, 2024
53500d1
Merge branch 'multiple-model-with-remote-service' of https://github.c…
sgurunat Nov 12, 2024
0d52c2f
Pinecone update to Readme and docker compose for ChatQnA (#540)
pallavijaini0525 Nov 13, 2024
7adbba6
Enable vLLM Profiling for ChatQnA (#1124)
louie-tsai Nov 13, 2024
d7414b9
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 13, 2024
502f2d5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Nov 13, 2024
393367e
Fix left issue of tgi version update (#1121)
chensuyue Nov 13, 2024
de76c7a
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 13, 2024
b5f95f7
Fix missing end of file chars (#1106)
ashahba Nov 13, 2024
9ff7df9
Use fixed version of TEI Gaudi for stability (#1101)
lvliang-intel Nov 13, 2024
7c9ed04
ChatQnA - Add Terraform and Ansible Modules information (#970)
lucasmelogithub Nov 13, 2024
73879d3
fix faq ui bug (#1118)
XinyaoWa Nov 14, 2024
4df84e5
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 14, 2024
5720cd4
Add benchmark launcher for AudioQnA (#981)
joshuayao Nov 14, 2024
bdc873f
added test_compose_on_gaudi.sh file
sgurunat Nov 14, 2024
159b58b
Merge branch 'multiple-model-with-remote-service' of https://github.c…
sgurunat Nov 14, 2024
6b9a27d
DBQnA: Include workflow in README (#956)
hteeyeoh Nov 14, 2024
d023af8
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 14, 2024
2b2c7ee
upgrade setuptools version to fix CVE-2024-6345 (#999)
chensuyue Nov 14, 2024
0bc52a5
Merge branch 'main' into multiple-model-with-remote-service
sgurunat Nov 14, 2024
d961b30
Modified test_compose_on_gaudi compose to use build.yaml file
sgurunat Nov 14, 2024
bd97160
Updated compose.yaml file in gaudi folder related to codegen
sgurunat Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/code_spell_ignore.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ModelIn
modelin
2 changes: 1 addition & 1 deletion .github/license_template.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Copyright (C) 2024 Intel Corporation
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: Apache-2.0
10 changes: 10 additions & 0 deletions .github/workflows/_example-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ on:
default: "main"
required: false
type: string
inject_commit:
default: false
required: false
type: string

jobs:
####################################################################################################
# Image Build
Expand Down Expand Up @@ -72,6 +77,10 @@ jobs:
git clone https://github.com/vllm-project/vllm.git
cd vllm && git rev-parse HEAD && cd ../
fi
if [[ $(grep -c "vllm-hpu:" ${docker_compose_path}) != 0 ]]; then
git clone https://github.com/HabanaAI/vllm-fork.git
cd vllm-fork && 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 ../

Expand All @@ -83,6 +92,7 @@ jobs:
docker_compose_path: ${{ github.workspace }}/${{ inputs.example }}/docker_image_build/build.yaml
service_list: ${{ inputs.services }}
registry: ${OPEA_IMAGE_REPO}opea
inject_commit: ${{ inputs.inject_commit }}
tag: ${{ inputs.tag }}

####################################################################################################
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/_manifest-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,16 @@ jobs:
echo "Validate ${{ inputs.example }} successful!"
else
echo "Validate ${{ inputs.example }} failure!!!"
.github/workflows/scripts/k8s-utils.sh dump_all_pod_logs $NAMESPACE
echo "Check the logs in 'Dump logs when e2e test failed' step!!!"
exit 1
fi
fi

- name: Dump logs when e2e test failed
if: failure()
run: |
.github/workflows/scripts/k8s-utils.sh dump_all_pod_logs $NAMESPACE

- name: Kubectl uninstall
if: always()
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/_run-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ jobs:
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
container_list=$(cat $yaml_file | 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
docker system prune -f
docker rmi $(docker images --filter reference="*:5000/*/*" -q) || true

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/check-online-doc-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Check Online Document Building
permissions: {}

on:
pull_request:
branches: [main]
paths:
- "**.md"
- "**.rst"

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v4
with:
path: GenAIExamples

- name: Checkout docs
uses: actions/checkout@v4
with:
repository: opea-project/docs
path: docs

- name: Build Online Document
shell: bash
run: |
echo "build online doc"
cd docs
bash scripts/build.sh
6 changes: 6 additions & 0 deletions .github/workflows/manual-example-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ on:
description: 'OPEA branch for image build'
required: false
type: string
inject_commit:
default: true
description: "inject commit to docker images true or false"
required: false
type: string

permissions: read-all
jobs:
Expand Down Expand Up @@ -101,4 +106,5 @@ jobs:
test_k8s: ${{ fromJSON(inputs.test_k8s) }}
test_gmc: ${{ fromJSON(inputs.test_gmc) }}
opea_branch: ${{ inputs.opea_branch }}
inject_commit: ${{ inputs.inject_commit }}
secrets: inherit
7 changes: 7 additions & 0 deletions .github/workflows/manual-image-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ on:
description: 'OPEA branch for image build'
required: false
type: string
inject_commit:
default: true
description: "inject commit to docker images true or false"
required: false
type: string

jobs:
get-test-matrix:
runs-on: ubuntu-latest
Expand All @@ -56,4 +62,5 @@ jobs:
services: ${{ inputs.services }}
tag: ${{ inputs.tag }}
opea_branch: ${{ inputs.opea_branch }}
inject_commit: ${{ inputs.inject_commit }}
secrets: inherit
70 changes: 70 additions & 0 deletions .github/workflows/nightly-docker-build-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

name: Nightly build/publish latest docker images

on:
schedule:
- cron: "30 13 * * *" # UTC time
workflow_dispatch:

env:
EXAMPLES: "AgentQnA,AudioQnA,ChatQnA,CodeGen,CodeTrans,DocIndexRetriever,DocSum,FaqGen,InstructionTuning,MultimodalQnA,ProductivitySuite,RerankFinetuning,SearchQnA,Translation,VideoQnA,VisualQnA"
TAG: "latest"
PUBLISH_TAGS: "latest"

jobs:
get-build-matrix:
runs-on: ubuntu-latest
outputs:
examples_json: ${{ steps.get-matrix.outputs.examples_json }}
EXAMPLES: ${{ steps.get-matrix.outputs.EXAMPLES }}
TAG: ${{ steps.get-matrix.outputs.TAG }}
PUBLISH_TAGS: ${{ steps.get-matrix.outputs.PUBLISH_TAGS }}
steps:
- name: Create Matrix
id: get-matrix
run: |
examples=($(echo ${EXAMPLES} | tr ',' ' '))
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
echo "examples_json=$examples_json" >> $GITHUB_OUTPUT
echo "EXAMPLES=$EXAMPLES" >> $GITHUB_OUTPUT
echo "TAG=$TAG" >> $GITHUB_OUTPUT
echo "PUBLISH_TAGS=$PUBLISH_TAGS" >> $GITHUB_OUTPUT

build:
needs: get-build-matrix
strategy:
matrix:
example: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json) }}
fail-fast: false
uses: ./.github/workflows/_example-workflow.yml
with:
node: gaudi
example: ${{ matrix.example }}
secrets: inherit

get-image-list:
needs: get-build-matrix
uses: ./.github/workflows/_get-image-list.yml
with:
examples: ${{ needs.get-build-matrix.outputs.EXAMPLES }}

publish:
needs: [get-build-matrix, get-image-list, build]
strategy:
matrix:
image: ${{ fromJSON(needs.get-image-list.outputs.matrix) }}
runs-on: "docker-build-gaudi"
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 }}:${{ needs.get-build-matrix.outputs.TAG }}
image_name: opea/${{ matrix.image }}
publish_tags: ${{ needs.get-build-matrix.outputs.PUBLISH_TAGS }}
2 changes: 1 addition & 1 deletion .github/workflows/pr-gmc-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- "**/tests/test_gmc**"
- "!**.md"
- "!**.txt"
- "!**/kubernetes/**/manifests/**"
- "!**/kubernetes/**/manifest/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-path-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ jobs:
changed_files="$(git diff --name-status --diff-filter=ARM ${{ github.event.pull_request.base.sha }} ${merged_commit} | awk '/\.md$/ {print $NF}')"
if [ -n "$changed_files" ]; then
for changed_file in $changed_files; do
echo $changed_file
# echo $changed_file
url_lines=$(grep -H -Eo '\]\(http[s]?://[^)]+\)' "$changed_file" | grep -Ev 'GenAIExamples/blob/main') || true
if [ -n "$url_lines" ]; then
for url_line in $url_lines; do
echo $url_line
# echo $url_line
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")
response=$(curl -L -s -o /dev/null -w "%{http_code}" "$url")|| true
if [ "$response" -ne 200 ]; then
echo "**********Validation failed, try again**********"
response_retry=$(curl -s -o /dev/null -w "%{http_code}" "$url")
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/scripts/get_test_matrix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@ 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
cd tests
ls -l
hardware_list=$(find . -type f -name "test_compose*_on_*.sh" | cut -d/ -f2 | cut -d. -f1 | awk -F'_on_' '{print $2}'| sort -u)
echo "Test supported hardware list = ${hardware_list}"

run_hardware=""
if [[ $(printf '%s\n' "${changed_files[@]}" | grep ${example} | cut -d'/' -f2 | grep -E '*.py|Dockerfile*|ui|docker_image_build' ) ]]; then
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
**/playwright/.cache/
**/test-results/

__pycache__/
__pycache__/
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
**/kubernetes/
**/kubernetes/
76 changes: 51 additions & 25 deletions AgentQnA/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,13 @@ flowchart LR
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
## Deployment with docker

- 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
1. Build agent docker image

## Getting started
Note: this is optional. The docker images will be automatically pulled when running the docker compose commands. This step is only needed if pulling images failed.

1. Build agent docker image </br>
First, clone the opea GenAIComps repo
First, clone the opea GenAIComps repo.

```
export WORKDIR=<your-work-directory>
Expand All @@ -106,35 +102,63 @@ flowchart LR
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
2. 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
Second, set up env vars.

```
export TOOLSET_PATH=$WORKDIR/GenAIExamples/AgentQnA/tools/
# optional: OPANAI_API_KEY
# for using open-source llms
export HUGGINGFACEHUB_API_TOKEN=<your-HF-token>
export HF_CACHE_DIR=<directory-where-llms-are-downloaded> #so that no need to redownload every time

# optional: OPANAI_API_KEY if you want to use OpenAI models
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.
3. Deploy the retrieval tool (i.e., DocIndexRetriever mega-service)

First, launch the mega-service.

```
cd $WORKDIR/GenAIExamples/AgentQnA/retrieval_tool
bash launch_retrieval_tool.sh
```

Then, ingest data into the vector database. Here we provide an example. You can ingest your own data.

```
bash run_ingest_data.sh
```

4. Launch other tools. </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
```

5. Launch agent services</br>
We provide two options for `llm_engine` of the agents: 1. open-source LLMs, 2. OpenAI models via API calls.

To use open-source LLMs on Gaudi2, run commands below.

```
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/hpu/gaudi
bash launch_tgi_gaudi.sh
bash launch_agent_service_tgi_gaudi.sh
```

To use OpenAI models, run commands below.

```
cd docker_compose/intel/cpu/xeon
cd $WORKDIR/GenAIExamples/AgentQnA/docker_compose/intel/cpu/xeon
bash launch_agent_service_openai.sh
```

Expand All @@ -143,10 +167,12 @@ flowchart LR
First look at logs of the agent docker containers:

```
docker logs docgrader-agent-endpoint
# worker agent
docker logs rag-agent-endpoint
```

```
# supervisor agent
docker logs react-agent-endpoint
```

Expand All @@ -170,4 +196,4 @@ curl http://${ip_address}:9090/v1/chat/completions -X POST -H "Content-Type: app

## 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).
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).
3 changes: 3 additions & 0 deletions AgentQnA/docker_compose/intel/cpu/xeon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Deployment on Xeon

We deploy the retrieval tool on Xeon. For LLMs, we support OpenAI models via API calls. For instructions on using open-source LLMs, please refer to the deployment guide [here](../../../../README.md).
Loading