Signed-off-by: Xinyao Wang <xinyao.wang@intel.com> Signed-off-by: lvliang-intel <liang1.lv@intel.com> Signed-off-by: letonghan <letong.han@intel.com> Signed-off-by: Wang, Kai Lawrence <kai.lawrence.wang@intel.com> Signed-off-by: Wang, Xigui <xigui.wang@intel.com> Signed-off-by: chensuyue <suyue.chen@intel.com> Signed-off-by: WenjiaoYue <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>
1.8 KiB
1.8 KiB
Dataprep Microservice with Pinecone
🚀Start Microservice with Python
Install Requirements
pip install -r requirements.txt
Start Pinecone Server
Please refer to this readme.
Setup Environment Variables
export http_proxy=${your_http_proxy}
export https_proxy=${your_http_proxy}
export PINECONE_API_KEY=${PINECONE_API_KEY}
export PINECONE_INDEX_NAME=${PINECONE_INDEX_NAME}
Start Document Preparation Microservice for Pinecone with Python Script
Start document preparation microservice for Pinecone with below command.
python prepare_doc_pinecone.py
🚀Start Microservice with Docker
Build Docker Image
cd ../../../../
docker build -t opea/dataprep-pinecone:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/pinecone/langchain/Dockerfile .
Run Docker with CLI
docker run -d --name="dataprep-pinecone-server" -p 6007:6007 --ipc=host -e http_proxy=$http_proxy -e https_proxy=$https_proxy opea/dataprep-pinecone:latest
Setup Environment Variables
export http_proxy=${your_http_proxy}
export https_proxy=${your_http_proxy}
export PINECONE_API_KEY=${PINECONE_API_KEY}
export PINECONE_INDEX_NAME=${PINECONE_INDEX_NAME}
Run Docker with Docker Compose
cd comps/dataprep/pinecone/langchain
docker compose -f docker-compose-dataprep-pinecone.yaml up -d
Invoke Microservice
Once document preparation microservice for Pinecone is started, user can use below command to invoke the microservice to convert the document to embedding and save to the database.
curl -X POST -H "Content-Type: application/json" -d '{"path":"/path/to/document"}' http://localhost:6007/v1/dataprep