Skip to content

Commit f7443f2

Browse files
Support Dataprep Microservice with Llama Index (#154)
* move file to langchain folder Signed-off-by: letonghan <[email protected]> * support dataprep with llama_index Signed-off-by: letonghan <[email protected]> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * add e2e test script Signed-off-by: letonghan <[email protected]> * update test script name Signed-off-by: letonghan <[email protected]> --------- Signed-off-by: letonghan <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 0dedc28 commit f7443f2

18 files changed

+312
-2
lines changed

comps/dataprep/redis/README.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# Dataprep Microservice with Redis
22

3+
For dataprep microservice, we provide two frameworks: `Langchain` and `LlamaIndex`.
4+
5+
We organized these two folders in the same way, so you can use either framework for dataprep microservice with the following constructions.
6+
37
# 🚀1. Start Microservice with Python(Option 1)
48

59
## 1.1 Install Requirements
610

711
```bash
12+
# for langchain
13+
cd langchain
14+
# for llama_index
15+
cd llama_index
816
pip install -r requirements.txt
917
```
1018

@@ -48,9 +56,18 @@ export LANGCHAIN_PROJECT="opea/dataprep"
4856

4957
## 2.3 Build Docker Image
5058

59+
- Build docker image with langchain
60+
61+
```bash
62+
cd ../../../../
63+
docker build -t opea/dataprep-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain/docker/Dockerfile .
64+
```
65+
66+
- Build docker image with llama_index
67+
5168
```bash
5269
cd ../../../../
53-
docker build -t opea/dataprep-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/docker/Dockerfile .
70+
docker build -t opea/dataprep-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/llama_index/docker/Dockerfile .
5471
```
5572

5673
## 2.4 Run Docker with CLI (Option A)
@@ -62,7 +79,10 @@ docker run -d --name="dataprep-redis-server" -p 6007:6007 --ipc=host -e http_pro
6279
## 2.5 Run with Docker Compose (Option B)
6380

6481
```bash
65-
cd comps/dataprep/redis/docker
82+
# for langchain
83+
cd comps/dataprep/redis/langchain/docker
84+
# for llama_index
85+
cd comps/dataprep/redis/llama_index/docker
6686
docker compose -f docker-compose-dataprep-redis.yaml up -d
6787
```
6888

0 commit comments

Comments
 (0)