Skip to content

Commit 372d78c

Browse files
authored
[Doc] Refine READMEs (#841)
Signed-off-by: letonghan <[email protected]>
1 parent 933c3d3 commit 372d78c

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

ChatQnA/README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ Refer to the [AI PC Guide](./docker_compose/intel/cpu/aipc/README.md) for instru
245245

246246
Refer to the [Intel Technology enabling for Openshift readme](https://github.com/intel/intel-technology-enabling-for-openshift/blob/main/workloads/opea/chatqna/README.md) for instructions to deploy ChatQnA prototype on RHOCP with [Red Hat OpenShift AI (RHOAI)](https://www.redhat.com/en/technologies/cloud-computing/openshift/openshift-ai).
247247

248-
## Consume ChatQnA Service
248+
## Consume ChatQnA Service with RAG
249+
250+
### Check Service Status
249251

250252
Before consuming ChatQnA Service, make sure the TGI/vLLM service is ready (which takes up to 2 minutes to start).
251253

@@ -260,6 +262,23 @@ Consume ChatQnA service until you get the TGI response like below.
260262
2024-09-03T02:47:53.402023Z INFO text_generation_router::server: router/src/server.rs:2311: Connected
261263
```
262264

265+
### Upload RAG Files (Optional)
266+
267+
To chat with retrieved information, you need to upload a file using `Dataprep` service.
268+
269+
Here is an example of `Nike 2023` pdf.
270+
271+
```bash
272+
# download pdf file
273+
wget https://raw.githubusercontent.com/opea-project/GenAIComps/main/comps/retrievers/redis/data/nke-10k-2023.pdf
274+
# upload pdf file with dataprep
275+
curl -X POST "http://${host_ip}:6007/v1/dataprep" \
276+
-H "Content-Type: multipart/form-data" \
277+
-F "files=@./nke-10k-2023.pdf"
278+
```
279+
280+
### Consume Chat Service
281+
263282
Two ways of consuming ChatQnA Service:
264283

265284
1. Use cURL command on terminal

DocSum/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Two ways of consuming Document Summarization Service:
147147

148148
```bash
149149
http_proxy=""
150-
curl http://${your_ip}:8008/generate \
150+
curl http://${host_ip}:8008/generate \
151151
-X POST \
152152
-d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
153153
-H 'Content-Type: application/json'

DocSum/docker_compose/intel/cpu/xeon/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ docker compose up -d
105105
1. TGI Service
106106

107107
```bash
108-
curl http://${your_ip}:8008/generate \
108+
curl http://${host_ip}:8008/generate \
109109
-X POST \
110110
-d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":17, "do_sample": true}}' \
111111
-H 'Content-Type: application/json'
@@ -114,7 +114,7 @@ docker compose up -d
114114
2. LLM Microservice
115115

116116
```bash
117-
curl http://${your_ip}:9000/v1/chat/docsum \
117+
curl http://${host_ip}:9000/v1/chat/docsum \
118118
-X POST \
119119
-d '{"query":"Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}' \
120120
-H 'Content-Type: application/json'

DocSum/docker_compose/intel/hpu/gaudi/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ docker compose up -d
9696
1. TGI Service
9797

9898
```bash
99-
curl http://${your_ip}:8008/generate \
99+
curl http://${host_ip}:8008/generate \
100100
-X POST \
101101
-d '{"inputs":"What is Deep Learning?","parameters":{"max_new_tokens":64, "do_sample": true}}' \
102102
-H 'Content-Type: application/json'
@@ -105,7 +105,7 @@ docker compose up -d
105105
2. LLM Microservice
106106

107107
```bash
108-
curl http://${your_ip}:9000/v1/chat/docsum \
108+
curl http://${host_ip}:9000/v1/chat/docsum \
109109
-X POST \
110110
-d '{"query":"Text Embeddings Inference (TEI) is a toolkit for deploying and serving open source text embeddings and sequence classification models. TEI enables high-performance extraction for the most popular models, including FlagEmbedding, Ember, GTE and E5."}' \
111111
-H 'Content-Type: application/json'

0 commit comments

Comments
 (0)