Skip to content

Commit 335362a

Browse files
authored
Udpate ChatQnA docker compose for Dataprep Update (#336)
* udpate chatqna readme & docker compose for dataprep update Signed-off-by: letonghan <[email protected]>
1 parent f9312b3 commit 335362a

File tree

6 files changed

+98
-1
lines changed

6 files changed

+98
-1
lines changed

ChatQnA/docker/gaudi/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
112112
export LLM_SERVICE_HOST_IP=${host_ip}
113113
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
114114
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
115+
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
116+
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
115117
```
116118

117119
Note: Please replace with `host_ip` with you external IP address, do **NOT** use localhost.
@@ -231,6 +233,32 @@ curl -X POST "http://${host_ip}:6007/v1/dataprep" \
231233

232234
This command updates a knowledge base by submitting a list of HTTP links for processing.
233235

236+
Also, you are able to get the file/link list that you uploaded:
237+
238+
```bash
239+
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
240+
-H "Content-Type: application/json"
241+
```
242+
243+
To delete the file/link you uploaded:
244+
245+
```bash
246+
# delete link
247+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
248+
-d '{"file_path": "https://opea.dev"}' \
249+
-H "Content-Type: application/json"
250+
251+
# delete file
252+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
253+
-d '{"file_path": "nke-10k-2023.pdf"}' \
254+
-H "Content-Type: application/json"
255+
256+
# delete all uploaded files and links
257+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
258+
-d '{"file_path": "all"}' \
259+
-H "Content-Type: application/json"
260+
```
261+
234262
## Enable LangSmith for Monotoring Application (Optional)
235263

236264
LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.

ChatQnA/docker/gaudi/docker_compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
- redis-vector-db
1919
ports:
2020
- "6007:6007"
21+
- "6008:6008"
22+
- "6009:6009"
2123
environment:
2224
no_proxy: ${no_proxy}
2325
http_proxy: ${http_proxy}
@@ -192,6 +194,8 @@ services:
192194
- http_proxy=${http_proxy}
193195
- CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
194196
- UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT}
197+
- GET_FILE=${DATAPREP_GET_FILE_ENDPOINT}
198+
- DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT}
195199
ipc: host
196200
restart: always
197201

ChatQnA/docker/gpu/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
100100
export LLM_SERVICE_HOST_IP=${host_ip}
101101
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
102102
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
103+
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
104+
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
103105
```
104106

105107
Note: Please replace with `host_ip` with you external IP address, do **NOT** use localhost.
@@ -219,6 +221,32 @@ curl -X POST "http://${host_ip}:6007/v1/dataprep" \
219221

220222
This command updates a knowledge base by submitting a list of HTTP links for processing.
221223

224+
Also, you are able to get the file list that you uploaded:
225+
226+
```bash
227+
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
228+
-H "Content-Type: application/json"
229+
```
230+
231+
To delete the file/link you uploaded:
232+
233+
```bash
234+
# delete link
235+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
236+
-d '{"file_path": "https://opea.dev"}' \
237+
-H "Content-Type: application/json"
238+
239+
# delete file
240+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
241+
-d '{"file_path": "nke-10k-2023.pdf"}' \
242+
-H "Content-Type: application/json"
243+
244+
# delete all uploaded files and links
245+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
246+
-d '{"file_path": "all"}' \
247+
-H "Content-Type: application/json"
248+
```
249+
222250
## Enable LangSmith for Monotoring Application (Optional)
223251

224252
LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.

ChatQnA/docker/gpu/docker_compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
- redis-vector-db
1919
ports:
2020
- "6007:6007"
21+
- "6008:6008"
22+
- "6009:6009"
2123
environment:
2224
no_proxy: ${no_proxy}
2325
http_proxy: ${http_proxy}
@@ -204,6 +206,8 @@ services:
204206
- http_proxy=${http_proxy}
205207
- CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
206208
- UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT}
209+
- GET_FILE=${DATAPREP_GET_FILE_ENDPOINT}
210+
- DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT}
207211
ipc: host
208212
restart: always
209213

ChatQnA/docker/xeon/README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ Build frontend Docker image that enables Conversational experience with ChatQnA
128128
cd GenAIExamples/ChatQnA/docker/ui/
129129
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
130130
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
131-
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 -f ./docker/Dockerfile.react .
131+
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
132+
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 .
132133
cd ../../../..
133134
```
134135

@@ -190,6 +191,8 @@ export RERANK_SERVICE_HOST_IP=${host_ip}
190191
export LLM_SERVICE_HOST_IP=${host_ip}
191192
export BACKEND_SERVICE_ENDPOINT="http://${host_ip}:8888/v1/chatqna"
192193
export DATAPREP_SERVICE_ENDPOINT="http://${host_ip}:6007/v1/dataprep"
194+
export DATAPREP_GET_FILE_ENDPOINT="http://${host_ip}:6008/v1/dataprep/get_file"
195+
export DATAPREP_DELETE_FILE_ENDPOINT="http://${host_ip}:6009/v1/dataprep/delete_file"
193196
```
194197

195198
Note: Please replace with `host_ip` with you external IP address, do not use localhost.
@@ -309,6 +312,32 @@ curl -X POST "http://${host_ip}:6007/v1/dataprep" \
309312

310313
This command updates a knowledge base by submitting a list of HTTP links for processing.
311314

315+
Also, you are able to get the file list that you uploaded:
316+
317+
```bash
318+
curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
319+
-H "Content-Type: application/json"
320+
```
321+
322+
To delete the file/link you uploaded:
323+
324+
```bash
325+
# delete link
326+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
327+
-d '{"file_path": "https://opea.dev"}' \
328+
-H "Content-Type: application/json"
329+
330+
# delete file
331+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
332+
-d '{"file_path": "nke-10k-2023.pdf"}' \
333+
-H "Content-Type: application/json"
334+
335+
# delete all uploaded files and links
336+
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
337+
-d '{"file_path": "all"}' \
338+
-H "Content-Type: application/json"
339+
```
340+
312341
## Enable LangSmith for Monotoring Application (Optional)
313342

314343
LangSmith offers tools to debug, evaluate, and monitor language models and intelligent agents. It can be used to assess benchmark data for each microservice. Before launching your services with `docker compose -f docker_compose.yaml up -d`, you need to enable LangSmith tracing by setting the `LANGCHAIN_TRACING_V2` environment variable to true and configuring your LangChain API key.

ChatQnA/docker/xeon/docker_compose.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ services:
1818
- redis-vector-db
1919
ports:
2020
- "6007:6007"
21+
- "6008:6008"
22+
- "6009:6009"
2123
environment:
2224
no_proxy: ${no_proxy}
2325
http_proxy: ${http_proxy}
@@ -183,6 +185,8 @@ services:
183185
- http_proxy=${http_proxy}
184186
- CHAT_BASE_URL=${BACKEND_SERVICE_ENDPOINT}
185187
- UPLOAD_FILE_BASE_URL=${DATAPREP_SERVICE_ENDPOINT}
188+
- GET_FILE=${DATAPREP_GET_FILE_ENDPOINT}
189+
- DELETE_FILE=${DATAPREP_DELETE_FILE_ENDPOINT}
186190
ipc: host
187191
restart: always
188192
chaqna-xeon-conversation-ui-server:

0 commit comments

Comments
 (0)