From 75a54eb343319a8ae017aa22f0ec00dea57ca226 Mon Sep 17 00:00:00 2001 From: lkk Date: Mon, 6 Jan 2025 06:15:33 +0000 Subject: [PATCH 1/5] refine agent directories. --- AgentQnA/README.md | 4 ++-- AgentQnA/docker_compose/amd/gpu/rocm/compose.yaml | 4 ++-- AgentQnA/docker_compose/intel/cpu/xeon/README.md | 4 ++-- AgentQnA/docker_compose/intel/cpu/xeon/compose_openai.yaml | 4 ++-- AgentQnA/docker_compose/intel/hpu/gaudi/README.md | 4 ++-- AgentQnA/docker_compose/intel/hpu/gaudi/compose.yaml | 4 ++-- AgentQnA/docker_image_build/build.yaml | 6 +++--- AgentQnA/tests/_test_compose_openai_on_xeon.sh | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/AgentQnA/README.md b/AgentQnA/README.md index 8caebaaffb..549157c484 100644 --- a/AgentQnA/README.md +++ b/AgentQnA/README.md @@ -100,7 +100,7 @@ Then build the agent docker image. Both the supervisor agent and the worker agen ``` 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 . +docker build -t opea/agent:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/agent/src/Dockerfile . ``` 2. Set up environment for this example
@@ -220,4 +220,4 @@ curl http://${host_ip}:9090/v1/chat/completions -X POST -H "Content-Type: applic ## 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). +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/src/README.md). diff --git a/AgentQnA/docker_compose/amd/gpu/rocm/compose.yaml b/AgentQnA/docker_compose/amd/gpu/rocm/compose.yaml index 965a61bd46..c1864ff374 100644 --- a/AgentQnA/docker_compose/amd/gpu/rocm/compose.yaml +++ b/AgentQnA/docker_compose/amd/gpu/rocm/compose.yaml @@ -31,7 +31,7 @@ services: command: --model-id ${LLM_MODEL_ID} --max-input-length 4096 --max-total-tokens 8192 worker-rag-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: rag-agent-endpoint volumes: # - ${WORKDIR}/GenAIExamples/AgentQnA/docker_image_build/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/ @@ -62,7 +62,7 @@ services: port: 9095 supervisor-react-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: react-agent-endpoint depends_on: - agent-tgi-server diff --git a/AgentQnA/docker_compose/intel/cpu/xeon/README.md b/AgentQnA/docker_compose/intel/cpu/xeon/README.md index 8d373c2ddb..1da7685349 100644 --- a/AgentQnA/docker_compose/intel/cpu/xeon/README.md +++ b/AgentQnA/docker_compose/intel/cpu/xeon/README.md @@ -60,7 +60,7 @@ This example showcases a hierarchical multi-agent system for question-answering ``` git clone https://github.com/opea-project/GenAIComps.git cd GenAIComps - docker build -t opea/agent-langchain:latest -f comps/agent/langchain/Dockerfile . + docker build -t opea/agent:latest -f comps/agent/src/Dockerfile . ``` ## Validate services @@ -97,4 +97,4 @@ curl http://${host_ip}:9090/v1/chat/completions -X POST -H "Content-Type: applic ## 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). +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/src/README.md). diff --git a/AgentQnA/docker_compose/intel/cpu/xeon/compose_openai.yaml b/AgentQnA/docker_compose/intel/cpu/xeon/compose_openai.yaml index a9032cce3b..3b78f97a1c 100644 --- a/AgentQnA/docker_compose/intel/cpu/xeon/compose_openai.yaml +++ b/AgentQnA/docker_compose/intel/cpu/xeon/compose_openai.yaml @@ -3,7 +3,7 @@ services: worker-rag-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: rag-agent-endpoint volumes: - ${TOOLSET_PATH}:/home/user/tools/ @@ -33,7 +33,7 @@ services: supervisor-react-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: react-agent-endpoint depends_on: - worker-rag-agent diff --git a/AgentQnA/docker_compose/intel/hpu/gaudi/README.md b/AgentQnA/docker_compose/intel/hpu/gaudi/README.md index 21735e3984..dcf8adfdc6 100644 --- a/AgentQnA/docker_compose/intel/hpu/gaudi/README.md +++ b/AgentQnA/docker_compose/intel/hpu/gaudi/README.md @@ -65,7 +65,7 @@ For more details, please refer to the deployment guide [here](../../../../README ``` git clone https://github.com/opea-project/GenAIComps.git cd GenAIComps - docker build -t opea/agent-langchain:latest -f comps/agent/langchain/Dockerfile . + docker build -t opea/agent:latest -f comps/agent/src/Dockerfile . ``` ## Validate services @@ -102,4 +102,4 @@ curl http://${host_ip}:9090/v1/chat/completions -X POST -H "Content-Type: applic ## 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). +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/src/README.md). diff --git a/AgentQnA/docker_compose/intel/hpu/gaudi/compose.yaml b/AgentQnA/docker_compose/intel/hpu/gaudi/compose.yaml index 02b30c07a0..a586ffd520 100644 --- a/AgentQnA/docker_compose/intel/hpu/gaudi/compose.yaml +++ b/AgentQnA/docker_compose/intel/hpu/gaudi/compose.yaml @@ -3,7 +3,7 @@ services: worker-rag-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: rag-agent-endpoint volumes: # - ${WORKDIR}/GenAIExamples/AgentQnA/docker_image_build/GenAIComps/comps/agent/langchain/:/home/user/comps/agent/langchain/ @@ -35,7 +35,7 @@ services: supervisor-react-agent: - image: opea/agent-langchain:latest + image: opea/agent:latest container_name: react-agent-endpoint depends_on: - worker-rag-agent diff --git a/AgentQnA/docker_image_build/build.yaml b/AgentQnA/docker_image_build/build.yaml index e2a778b9aa..61f2b0dda5 100644 --- a/AgentQnA/docker_image_build/build.yaml +++ b/AgentQnA/docker_image_build/build.yaml @@ -2,12 +2,12 @@ # SPDX-License-Identifier: Apache-2.0 services: - agent-langchain: + agent: build: context: GenAIComps - dockerfile: comps/agent/langchain/Dockerfile + dockerfile: comps/agent/src/Dockerfile args: http_proxy: ${http_proxy} https_proxy: ${https_proxy} no_proxy: ${no_proxy} - image: ${REGISTRY:-opea}/agent-langchain:${TAG:-latest} + image: ${REGISTRY:-opea}/agent:${TAG:-latest} diff --git a/AgentQnA/tests/_test_compose_openai_on_xeon.sh b/AgentQnA/tests/_test_compose_openai_on_xeon.sh index db180b75b0..5c8ef8913b 100644 --- a/AgentQnA/tests/_test_compose_openai_on_xeon.sh +++ b/AgentQnA/tests/_test_compose_openai_on_xeon.sh @@ -15,7 +15,7 @@ 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) + docker stop $(docker ps -q --filter ancestor=opea/agent:latest) } function stop_retrieval_tool() { From 89d3554304901c2ab4c2f14d6d46053854ddfbc5 Mon Sep 17 00:00:00 2001 From: lkk Date: Mon, 6 Jan 2025 06:41:32 +0000 Subject: [PATCH 2/5] update ci/cd. --- .github/workflows/_run-docker-compose.yml | 1 + .github/workflows/pr-docker-compose-e2e.yml | 2 +- .github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml | 1 + docker_images_list.md | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml index daf87add83..a30f7d378b 100644 --- a/.github/workflows/_run-docker-compose.yml +++ b/.github/workflows/_run-docker-compose.yml @@ -134,6 +134,7 @@ jobs: SERVING_TOKEN: ${{ secrets.SERVING_TOKEN }} IMAGE_REPO: ${{ inputs.registry }} IMAGE_TAG: ${{ inputs.tag }} + opea_branch: "change_agent_directories" example: ${{ inputs.example }} hardware: ${{ inputs.hardware }} test_case: ${{ matrix.test_case }} diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml index fe052f90a1..446afa9250 100644 --- a/.github/workflows/pr-docker-compose-e2e.yml +++ b/.github/workflows/pr-docker-compose-e2e.yml @@ -4,7 +4,7 @@ name: E2E test with docker compose on: - pull_request_target: + pull_request: branches: ["main", "*rc"] types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: diff --git a/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml b/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml index ededdba43c..32bdd08265 100644 --- a/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml +++ b/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml @@ -22,6 +22,7 @@ jobs: run: | cd .. git clone https://github.com/opea-project/GenAIComps.git + cd GenAIComps && git checkout change_agent_directories - name: Check for Missing Dockerfile Paths in GenAIComps run: | diff --git a/docker_images_list.md b/docker_images_list.md index 2336df9e38..49d292637e 100644 --- a/docker_images_list.md +++ b/docker_images_list.md @@ -42,7 +42,7 @@ Take ChatQnA for example. ChatQnA is a chatbot application service based on the | Microservice Images | Dockerfile | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [opea/agent-langchain](https://hub.docker.com/r/opea/comps-agent-langchain) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/langchain/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | +| [opea/agent](https://hub.docker.com/r/opea/comps-agent) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | | [opea/asr](https://hub.docker.com/r/opea/asr) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/asr/src/Dockerfile) | The docker image exposed the OPEA Audio-Speech-Recognition microservice for GenAI application use | | [opea/chathistory-mongo-server](https://hub.docker.com/r/opea/chathistory-mongo-server) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/chathistory/mongo/Dockerfile) | The docker image exposes OPEA Chat History microservice which based on MongoDB database, designed to allow user to store, retrieve and manage chat conversations | | [opea/dataprep-milvus](https://hub.docker.com/r/opea/dataprep-milvus) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/dataprep/milvus/langchain/Dockerfile) | The docker image exposed the OPEA dataprep microservice based on milvus vectordb for GenAI application use | From 18c7f1dd343caaada86c72887d266f0f67e6c228 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 06:37:58 +0000 Subject: [PATCH 3/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docker_images_list.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_images_list.md b/docker_images_list.md index 49d292637e..769405e2bb 100644 --- a/docker_images_list.md +++ b/docker_images_list.md @@ -42,7 +42,7 @@ Take ChatQnA for example. ChatQnA is a chatbot application service based on the | Microservice Images | Dockerfile | Description | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [opea/agent](https://hub.docker.com/r/opea/comps-agent) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | +| [opea/agent](https://hub.docker.com/r/opea/comps-agent) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | | [opea/asr](https://hub.docker.com/r/opea/asr) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/asr/src/Dockerfile) | The docker image exposed the OPEA Audio-Speech-Recognition microservice for GenAI application use | | [opea/chathistory-mongo-server](https://hub.docker.com/r/opea/chathistory-mongo-server) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/chathistory/mongo/Dockerfile) | The docker image exposes OPEA Chat History microservice which based on MongoDB database, designed to allow user to store, retrieve and manage chat conversations | | [opea/dataprep-milvus](https://hub.docker.com/r/opea/dataprep-milvus) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/dataprep/milvus/langchain/Dockerfile) | The docker image exposed the OPEA dataprep microservice based on milvus vectordb for GenAI application use | From eba01150dd474293e854286ae83e6802a317874a Mon Sep 17 00:00:00 2001 From: chensuyue Date: Mon, 6 Jan 2025 17:38:30 +0800 Subject: [PATCH 4/5] Revert "update ci/cd." This reverts commit 89d35543 Signed-off-by: chensuyue --- .github/workflows/_run-docker-compose.yml | 1 - .github/workflows/pr-docker-compose-e2e.yml | 2 +- .github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml | 1 - docker_images_list.md | 4 ++-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/_run-docker-compose.yml b/.github/workflows/_run-docker-compose.yml index a30f7d378b..daf87add83 100644 --- a/.github/workflows/_run-docker-compose.yml +++ b/.github/workflows/_run-docker-compose.yml @@ -134,7 +134,6 @@ jobs: SERVING_TOKEN: ${{ secrets.SERVING_TOKEN }} IMAGE_REPO: ${{ inputs.registry }} IMAGE_TAG: ${{ inputs.tag }} - opea_branch: "change_agent_directories" example: ${{ inputs.example }} hardware: ${{ inputs.hardware }} test_case: ${{ matrix.test_case }} diff --git a/.github/workflows/pr-docker-compose-e2e.yml b/.github/workflows/pr-docker-compose-e2e.yml index 446afa9250..fe052f90a1 100644 --- a/.github/workflows/pr-docker-compose-e2e.yml +++ b/.github/workflows/pr-docker-compose-e2e.yml @@ -4,7 +4,7 @@ name: E2E test with docker compose on: - pull_request: + pull_request_target: branches: ["main", "*rc"] types: [opened, reopened, ready_for_review, synchronize] # added `ready_for_review` since draft is skipped paths: diff --git a/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml b/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml index 32bdd08265..ededdba43c 100644 --- a/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml +++ b/.github/workflows/pr-dockerfile-path-and-build-yaml-scan.yml @@ -22,7 +22,6 @@ jobs: run: | cd .. git clone https://github.com/opea-project/GenAIComps.git - cd GenAIComps && git checkout change_agent_directories - name: Check for Missing Dockerfile Paths in GenAIComps run: | diff --git a/docker_images_list.md b/docker_images_list.md index 769405e2bb..5671111ebc 100644 --- a/docker_images_list.md +++ b/docker_images_list.md @@ -41,8 +41,8 @@ Take ChatQnA for example. ChatQnA is a chatbot application service based on the ## Microservice images | Microservice Images | Dockerfile | Description | -| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [opea/agent](https://hub.docker.com/r/opea/comps-agent) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | +|---------------------------------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [opea/agent]() | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | | [opea/asr](https://hub.docker.com/r/opea/asr) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/asr/src/Dockerfile) | The docker image exposed the OPEA Audio-Speech-Recognition microservice for GenAI application use | | [opea/chathistory-mongo-server](https://hub.docker.com/r/opea/chathistory-mongo-server) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/chathistory/mongo/Dockerfile) | The docker image exposes OPEA Chat History microservice which based on MongoDB database, designed to allow user to store, retrieve and manage chat conversations | | [opea/dataprep-milvus](https://hub.docker.com/r/opea/dataprep-milvus) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/dataprep/milvus/langchain/Dockerfile) | The docker image exposed the OPEA dataprep microservice based on milvus vectordb for GenAI application use | From ca4f876fd9c81f5cc0e5006e11c9fe91bfe5fdcf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 09:39:28 +0000 Subject: [PATCH 5/5] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docker_images_list.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker_images_list.md b/docker_images_list.md index 5671111ebc..ffd81d1a68 100644 --- a/docker_images_list.md +++ b/docker_images_list.md @@ -41,8 +41,8 @@ Take ChatQnA for example. ChatQnA is a chatbot application service based on the ## Microservice images | Microservice Images | Dockerfile | Description | -|---------------------------------------------------------------------------------------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| [opea/agent]() | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | +| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [opea/agent]() | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/agent/src/Dockerfile) | The docker image exposed the OPEA agent microservice for GenAI application use | | [opea/asr](https://hub.docker.com/r/opea/asr) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/asr/src/Dockerfile) | The docker image exposed the OPEA Audio-Speech-Recognition microservice for GenAI application use | | [opea/chathistory-mongo-server](https://hub.docker.com/r/opea/chathistory-mongo-server) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/chathistory/mongo/Dockerfile) | The docker image exposes OPEA Chat History microservice which based on MongoDB database, designed to allow user to store, retrieve and manage chat conversations | | [opea/dataprep-milvus](https://hub.docker.com/r/opea/dataprep-milvus) | [Link](https://github.com/opea-project/GenAIComps/blob/main/comps/dataprep/milvus/langchain/Dockerfile) | The docker image exposed the OPEA dataprep microservice based on milvus vectordb for GenAI application use |