Skip to content

Commit

Permalink
update chatqna dataprep-redis port (#557)
Browse files Browse the repository at this point in the history
Co-authored-by: sdp <sdp@srf797636.jf.intel.com>
  • Loading branch information
lkk12014402 and sdp authored Aug 8, 2024
1 parent f08d411 commit 02a1536
Show file tree
Hide file tree
Showing 15 changed files with 29 additions and 51 deletions.
8 changes: 0 additions & 8 deletions ChatQnA/benchmark/two_gaudi/dataprep-microservice_run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ spec:
args: null
ports:
- containerPort: 6007
- containerPort: 6008
- containerPort: 6009
serviceAccountName: default
---
kind: Service
Expand All @@ -60,9 +58,3 @@ spec:
- name: port1
port: 6007
targetPort: 6007
- name: port2
port: 6008
targetPort: 6008
- name: port3
port: 6009
targetPort: 6009
12 changes: 6 additions & 6 deletions ChatQnA/docker/gaudi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
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"
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
```

If guardrails microservice is enabled in the pipeline, the below environment variables are necessary to be set.
Expand Down Expand Up @@ -367,25 +367,25 @@ This command updates a knowledge base by submitting a list of HTTP links for pro
Also, you are able to get the file/link list that you uploaded:

```bash
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/get_file" \
-H "Content-Type: application/json"
```

To delete the file/link you uploaded:

```bash
# delete link
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "https://opea.dev"}' \
-H "Content-Type: application/json"

# delete file
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "nke-10k-2023.pdf"}' \
-H "Content-Type: application/json"

# delete all uploaded files and links
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "all"}' \
-H "Content-Type: application/json"
```
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/gaudi/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/gaudi/compose_guardrails.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/gaudi/compose_vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/gaudi/compose_vllm_ray.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
12 changes: 6 additions & 6 deletions ChatQnA/docker/gpu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
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"
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
```

Note: Please replace with `host_ip` with you external IP address, do **NOT** use localhost.
Expand Down Expand Up @@ -220,25 +220,25 @@ This command updates a knowledge base by submitting a list of HTTP links for pro
Also, you are able to get the file list that you uploaded:

```bash
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/get_file" \
-H "Content-Type: application/json"
```

To delete the file/link you uploaded:

```bash
# delete link
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "https://opea.dev"}' \
-H "Content-Type: application/json"

# delete file
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "nke-10k-2023.pdf"}' \
-H "Content-Type: application/json"

# delete all uploaded files and links
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "all"}' \
-H "Content-Type: application/json"
```
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/gpu/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
4 changes: 2 additions & 2 deletions ChatQnA/docker/gpu/set_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
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"
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
4 changes: 2 additions & 2 deletions ChatQnA/docker/ui/svelte/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ CHAT_BASE_URL = 'http://backend_address:8888/v1/chatqna'

UPLOAD_FILE_BASE_URL = 'http://backend_address:6007/v1/dataprep'

GET_FILE = 'http://backend_address:6008/v1/dataprep/get_file'
GET_FILE = 'http://backend_address:6007/v1/dataprep/get_file'

DELETE_FILE = 'http://backend_address:6009/v1/dataprep/delete_file'
DELETE_FILE = 'http://backend_address:6007/v1/dataprep/delete_file'
14 changes: 7 additions & 7 deletions ChatQnA/docker/xeon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
cd GenAIExamples/ChatQnA/docker/ui/
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
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_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
docker build --no-cache -t opea/chatqna-conversation-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy --build-arg BACKEND_SERVICE_ENDPOINT=$BACKEND_SERVICE_ENDPOINT --build-arg DATAPREP_SERVICE_ENDPOINT=$DATAPREP_SERVICE_ENDPOINT --build-arg DATAPREP_GET_FILE_ENDPOINT=$DATAPREP_GET_FILE_ENDPOINT -f ./docker/Dockerfile.react .
cd ../../../..
```
Expand Down Expand Up @@ -211,8 +211,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
export LLM_SERVICE_HOST_IP=${host_ip}
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
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"
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6007/v1/dataprep/delete_file"
```

Note: Please replace with `host_ip` with you external IP address, do not use localhost.
Expand Down Expand Up @@ -352,25 +352,25 @@ This command updates a knowledge base by submitting a list of HTTP links for pro
Also, you are able to get the file list that you uploaded:

```bash
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/get_file" \
-H "Content-Type: application/json"
```

To delete the file/link you uploaded:

```bash
# delete link
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "https://opea.dev"}' \
-H "Content-Type: application/json"

# delete file
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "nke-10k-2023.pdf"}' \
-H "Content-Type: application/json"

# delete all uploaded files and links
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
-d '{"file_path": "all"}' \
-H "Content-Type: application/json"
```
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/xeon/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
2 changes: 0 additions & 2 deletions ChatQnA/docker/xeon/docker_compose_vllm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ services:
- tei-embedding-service
ports:
- "6007:6007"
- "6008:6008"
- "6009:6009"
environment:
no_proxy: ${no_proxy}
http_proxy: ${http_proxy}
Expand Down
4 changes: 2 additions & 2 deletions ChatQnA/tests/test_chatqna_on_gaudi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ function validate_microservices() {

# test /v1/dataprep/get_file
validate_service \
"http://${ip_address}:6008/v1/dataprep/get_file" \
"http://${ip_address}:6007/v1/dataprep/get_file" \
'{"name":' \
"dataprep_get" \
"dataprep-redis-server"

# test /v1/dataprep/delete_file
validate_service \
"http://${ip_address}:6009/v1/dataprep/delete_file" \
"http://${ip_address}:6007/v1/dataprep/delete_file" \
'{"status":true}' \
"dataprep_del" \
"dataprep-redis-server"
Expand Down
8 changes: 4 additions & 4 deletions ChatQnA/tests/test_chatqna_on_xeon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ function start_services() {
export LLM_SERVICE_HOST_IP=${ip_address}
export BACKEND_SERVICE_ENDPOINT="http://${ip_address}:8888/v1/chatqna"
export DATAPREP_SERVICE_ENDPOINT="http://${ip_address}:6007/v1/dataprep"
export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6008/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6009/v1/dataprep/delete_file"
export DATAPREP_GET_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/get_file"
export DATAPREP_DELETE_FILE_ENDPOINT="http://${ip_address}:6007/v1/dataprep/delete_file"

sed -i "s/backend_address/$ip_address/g" $WORKPATH/docker/ui/svelte/.env

Expand Down Expand Up @@ -162,14 +162,14 @@ function validate_microservices() {

# test /v1/dataprep/get_file
validate_service \
"http://${ip_address}:6008/v1/dataprep/get_file" \
"http://${ip_address}:6007/v1/dataprep/get_file" \
'{"name":' \
"dataprep_get" \
"dataprep-redis-server"

# test /v1/dataprep/delete_file
validate_service \
"http://${ip_address}:6009/v1/dataprep/delete_file" \
"http://${ip_address}:6007/v1/dataprep/delete_file" \
'{"status":true}' \
"dataprep_del" \
"dataprep-redis-server"
Expand Down

0 comments on commit 02a1536

Please sign in to comment.