diff --git a/comps/dataprep/README.md b/comps/dataprep/README.md index 3cf8c00b63..0deb96c3bb 100644 --- a/comps/dataprep/README.md +++ b/comps/dataprep/README.md @@ -19,20 +19,28 @@ export SUMMARIZE_IMAGE_VIA_LVM=1 ## Dataprep Microservice with Redis -For details, please refer to this [langchain readme](langchain/redis/README.md) or [llama index readme](llama_index/redis/README.md) +For details, please refer to this [readme](redis/README.md) ## Dataprep Microservice with Milvus -For details, please refer to this [readme](langchain/milvus/README.md) +For details, please refer to this [readme](milvus/langchain/README.md) ## Dataprep Microservice with Qdrant -For details, please refer to this [readme](langchain/qdrant/README.md) +For details, please refer to this [readme](qdrant/langchain/README.md) ## Dataprep Microservice with Pinecone -For details, please refer to this [readme](langchain/pinecone/README.md) +For details, please refer to this [readme](pinecone/langchain/README.md) ## Dataprep Microservice with PGVector -For details, please refer to this [readme](langchain/pgvector/README.md) +For details, please refer to this [readme](pgvector/langchain/README.md) + +## Dataprep Microservice with VDMS + +For details, please refer to this [readme](vdms/README.md) + +## Dataprep Microservice with Multimodal + +For details, please refer to this [readme](multimodal/redis/langchain/README.md) diff --git a/comps/dataprep/redis/README.md b/comps/dataprep/redis/README.md index ed8beb5edf..384d9018f4 100644 --- a/comps/dataprep/redis/README.md +++ b/comps/dataprep/redis/README.md @@ -1,6 +1,6 @@ # Dataprep Microservice with Redis -We have provided dataprep microservice for multimodal data input (e.g., text and image) [here](../../multimodal/redis/langchain/README.md). +We have provided dataprep microservice for multimodal data input (e.g., text and image) [here](../multimodal/redis/langchain/README.md). For dataprep microservice for text input, we provide here two frameworks: `Langchain` and `LlamaIndex`. We also provide `Langchain_ray` which uses ray to parallel the data prep for multi-file performance improvement(observed 5x - 15x speedup by processing 1000 files/links.). @@ -33,7 +33,7 @@ cd langchain_ray; pip install -r requirements_ray.txt ### 1.2 Start Redis Stack Server -Please refer to this [readme](../../../vectorstores/redis/README.md). +Please refer to this [readme](../../vectorstores/redis/README.md). ### 1.3 Setup Environment Variables @@ -90,7 +90,7 @@ python prepare_doc_redis_on_ray.py ### 2.1 Start Redis Stack Server -Please refer to this [readme](../../../vectorstores/redis/README.md). +Please refer to this [readme](../../vectorstores/redis/README.md). ### 2.2 Setup Environment Variables @@ -109,21 +109,21 @@ export HUGGINGFACEHUB_API_TOKEN=${your_hf_api_token} - option 1: Start single-process version (for 1-10 files processing) ```bash -cd ../../../ +cd ../../ docker build -t opea/dataprep-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain/Dockerfile . ``` - Build docker image with llama_index ```bash -cd ../../../ +cd ../../ 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/Dockerfile . ``` - option 2: Start multi-process version (for >10 files processing) ```bash -cd ../../../../ +cd ../../../ docker build -t opea/dataprep-on-ray-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/dataprep/redis/langchain_ray/Dockerfile . ``` diff --git a/comps/dataprep/vdms/README.md b/comps/dataprep/vdms/README.md index 2a0d2ca457..7c4d8e86f8 100644 --- a/comps/dataprep/vdms/README.md +++ b/comps/dataprep/vdms/README.md @@ -27,7 +27,7 @@ cd langchain_ray; pip install -r requirements_ray.txt ## 1.2 Start VDMS Server -Please refer to this [readme](../../vectorstores/langchain/vdms/README.md). +Please refer to this [readme](../../vectorstores/vdms/README.md). ## 1.3 Setup Environment Variables @@ -37,8 +37,6 @@ export https_proxy=${your_http_proxy} export VDMS_HOST=${host_ip} export VDMS_PORT=55555 export COLLECTION_NAME=${your_collection_name} -export LANGCHAIN_TRACING_V2=true -export LANGCHAIN_PROJECT="opea/gen-ai-comps:dataprep" export PYTHONPATH=${path_to_comps} ``` @@ -62,7 +60,7 @@ python prepare_doc_redis_on_ray.py ## 2.1 Start VDMS Server -Please refer to this [readme](../../vectorstores/langchain/vdms/README.md). +Please refer to this [readme](../../vectorstores/vdms/README.md). ## 2.2 Setup Environment Variables diff --git a/comps/embeddings/README.md b/comps/embeddings/README.md index 6d524a71fa..6d48484f1c 100644 --- a/comps/embeddings/README.md +++ b/comps/embeddings/README.md @@ -18,20 +18,16 @@ Users are albe to configure and build embedding-related services according to th We support both `langchain` and `llama_index` for TEI serving. -For details, please refer to [langchain readme](langchain/tei/README.md) or [llama index readme](llama_index/tei/README.md). +For details, please refer to [langchain readme](tei/langchain/README.md) or [llama index readme](tei/llama_index/README.md). ## Embeddings Microservice with Mosec -For details, please refer to this [readme](langchain/mosec/README.md). +For details, please refer to this [readme](mosec/langchain/README.md). -## Embeddings Microservice with Neural Speed +## Embeddings Microservice with Multimodal -For details, please refer to this [readme](neural-speed/README.md). +For details, please refer to this [readme](multimodal/README.md). ## Embeddings Microservice with Multimodal Clip For details, please refer to this [readme](multimodal_clip/README.md). - -## Embeddings Microservice with Multimodal Langchain - -For details, please refer to this [readme](multimodal_embeddings/README.md). diff --git a/comps/guardrails/README.md b/comps/guardrails/README.md index ec7c885676..0a2686eb06 100644 --- a/comps/guardrails/README.md +++ b/comps/guardrails/README.md @@ -4,7 +4,7 @@ The Guardrails service enhances the security of LLM-based applications by offeri | MicroService | Description | | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| [Llama Guard](./llama_guard/README.md) | Provides guardrails for inputs and outputs to ensure safe interactions | +| [Llama Guard](./llama_guard/langchain/README.md) | Provides guardrails for inputs and outputs to ensure safe interactions | | [PII Detection](./pii_detection/README.md) | Detects Personally Identifiable Information (PII) and Business Sensitive Information (BSI) | | [Toxicity Detection](./toxicity_detection/README.md) | Detects Toxic language (rude, disrespectful, or unreasonable language that is likely to make someone leave a discussion) | diff --git a/comps/guardrails/llama_guard/langchain/README.md b/comps/guardrails/llama_guard/langchain/README.md index 473baf6b9a..869f308506 100644 --- a/comps/guardrails/llama_guard/langchain/README.md +++ b/comps/guardrails/llama_guard/langchain/README.md @@ -79,7 +79,7 @@ export LLM_MODEL_ID=${your_hf_llm_model} ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/guardrails-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/guardrails/llama_guard/langchain/Dockerfile . ``` diff --git a/comps/intent_detection/langchain/README.md b/comps/intent_detection/langchain/README.md index f2d0fa9dff..2368a65a9b 100644 --- a/comps/intent_detection/langchain/README.md +++ b/comps/intent_detection/langchain/README.md @@ -35,7 +35,7 @@ export TGI_LLM_ENDPOINT="http://${your_ip}:8008" Start intent detection microservice with below command. ```bash -cd /your_project_path/GenAIComps/ +cd ../../../ cp comps/intent_detection/langchain/intent_detection.py . python intent_detection.py ``` @@ -55,7 +55,7 @@ export TGI_LLM_ENDPOINT="http://${your_ip}:8008" ### 2.3 Build Docker Image ```bash -cd /your_project_path/GenAIComps +cd ../../../ docker build --no-cache -t opea/llm-tgi:latest -f comps/intent_detection/langchain/Dockerfile . ``` @@ -68,7 +68,6 @@ docker run -it --name="intent-tgi-server" --net=host --ipc=host -e http_proxy=$h ### 2.5 Run with Docker Compose (Option B) ```bash -cd /your_project_path/GenAIComps/comps/intent_detection/langchain export LLM_MODEL_ID=${your_hf_llm_model} export http_proxy=${your_http_proxy} export https_proxy=${your_http_proxy} diff --git a/comps/knowledgegraphs/langchain/README.md b/comps/knowledgegraphs/langchain/README.md index d4af41e8a4..a56dc0308b 100644 --- a/comps/knowledgegraphs/langchain/README.md +++ b/comps/knowledgegraphs/langchain/README.md @@ -73,7 +73,7 @@ curl $LLM_ENDPOINT/generate \ ### 1.4 Start Microservice ```bash -cd ../.. +cd ../../../ docker build -t opea/knowledge_graphs:latest \ --build-arg https_proxy=$https_proxy \ --build-arg http_proxy=$http_proxy \ diff --git a/comps/llms/faq-generation/tgi/langchain/README.md b/comps/llms/faq-generation/tgi/langchain/README.md index 37502b4ae0..fc47e7be0f 100644 --- a/comps/llms/faq-generation/tgi/langchain/README.md +++ b/comps/llms/faq-generation/tgi/langchain/README.md @@ -19,7 +19,7 @@ export LLM_MODEL_ID=${your_hf_llm_model} ### 1.2 Build Docker Image ```bash -cd ../../../../ +cd ../../../../../ docker build -t opea/llm-faqgen-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/faq-generation/tgi/langchain/Dockerfile . ``` @@ -43,7 +43,6 @@ docker run -d --name="llm-faqgen-server" -p 9000:9000 --ipc=host -e http_proxy=$ ### 1.4 Run Docker with Docker Compose (Option B) ```bash -cd faq-generation/tgi/docker docker compose -f docker_compose_llm.yaml up -d ``` diff --git a/comps/llms/summarization/tgi/langchain/README.md b/comps/llms/summarization/tgi/langchain/README.md index 58fe7a7449..a65d9beda7 100644 --- a/comps/llms/summarization/tgi/langchain/README.md +++ b/comps/llms/summarization/tgi/langchain/README.md @@ -53,7 +53,7 @@ export LLM_MODEL_ID=${your_hf_llm_model} ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../../ docker build -t opea/llm-docsum-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/summarization/tgi/langchain/Dockerfile . ``` diff --git a/comps/llms/text-generation/README.md b/comps/llms/text-generation/README.md index 33d7ad5c60..18897572ad 100644 --- a/comps/llms/text-generation/README.md +++ b/comps/llms/text-generation/README.md @@ -139,7 +139,7 @@ export CHAT_PROCESSOR="ChatModelLlama" #### 2.2.1 TGI ```bash -cd ../../ +cd ../../../ docker build -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile . ``` @@ -155,7 +155,7 @@ bash build_docker_vllm.sh Build microservice docker. ```bash -cd ../../ +cd ../../../ docker build -t opea/llm-vllm:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/vllm/langchain/Dockerfile . ``` @@ -171,8 +171,8 @@ bash build_docker_vllmray.sh Build microservice docker. ```bash -cd ../../ -docker build -t opea/llm-ray:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/vllm/Dockerfile . +cd ../../../ +docker build -t opea/llm-ray:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/vllm/ray/Dockerfile . ``` To start a docker container, you have two options: diff --git a/comps/llms/text-generation/tgi/README.md b/comps/llms/text-generation/tgi/README.md index f34dd0374f..c6843df4e7 100644 --- a/comps/llms/text-generation/tgi/README.md +++ b/comps/llms/text-generation/tgi/README.md @@ -32,7 +32,7 @@ curl http://${your_ip}:8008/generate \ ```bash export TGI_LLM_ENDPOINT="http://${your_ip}:8008" -python text-generation/tgi/llm.py +python llm.py ``` ## ๐Ÿš€2. Start Microservice with Docker (Option 2) @@ -52,7 +52,7 @@ export LLM_MODEL_ID=${your_hf_llm_model} ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/llm-tgi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/llms/text-generation/tgi/Dockerfile . ``` diff --git a/comps/llms/text-generation/vllm/README.md b/comps/llms/text-generation/vllm/README.md deleted file mode 100644 index f269d9a69e..0000000000 --- a/comps/llms/text-generation/vllm/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# VLLM Endpoint Service - -[vLLM](https://github.com/vllm-project/vllm) is a fast and easy-to-use library for LLM inference and serving, it delivers state-of-the-art serving throughput with a set of advanced features such as PagedAttention, Continuous batching and etc.. Besides GPUs, vLLM already supported [Intel CPUs](https://www.intel.com/content/www/us/en/products/overview.html) and [Gaudi accelerators](https://habana.ai/products). This guide provides an example on how to launch vLLM serving endpoint on CPU and Gaudi accelerators. - -## Embeddings Microservice with TEI - -We support both `langchain` and `llama_index` for TEI serving. - -For details, please refer to [langchain readme](langchain/tei/README.md) or [llama index readme](llama_index/tei/README.md). - -## Embeddings Microservice with Mosec - -For details, please refer to this [readme](langchain/mosec/README.md). - -## Embeddings Microservice with Neural Speed - -For details, please refer to this [readme](neural-speed/README.md). - -## Embeddings Microservice with Multimodal Clip - -For details, please refer to this [readme](multimodal_clip/README.md). - -## Embeddings Microservice with Multimodal Langchain - -For details, please refer to this [readme](multimodal_embeddings/README.md). diff --git a/comps/lvms/llava/README.md b/comps/lvms/llava/README.md index ecaa7803e0..59545d6869 100644 --- a/comps/lvms/llava/README.md +++ b/comps/lvms/llava/README.md @@ -63,14 +63,14 @@ docker build -t opea/llava:latest --build-arg https_proxy=$https_proxy --build-a - Gaudi2 HPU ```bash -cd ../.. +cd ../../../ docker build -t opea/llava:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/lvms/llava/dependency/Dockerfile.intel_hpu . ``` #### 2.1.2 LVM Service Image ```bash -cd ../.. +cd ../../../ docker build -t opea/lvm:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/lvms/llava/Dockerfile . ``` diff --git a/comps/reranks/fastrag/README.md b/comps/reranks/fastrag/README.md index d51da52b08..4afeffdaab 100644 --- a/comps/reranks/fastrag/README.md +++ b/comps/reranks/fastrag/README.md @@ -39,7 +39,7 @@ export EMBED_MODEL="Intel/bge-small-en-v1.5-rag-int8-static" ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../ docker build -t opea/reranking-fastrag:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/fastrag/Dockerfile . ``` diff --git a/comps/reranks/tei/README.md b/comps/reranks/tei/README.md index a46673119b..1a587efbab 100644 --- a/comps/reranks/tei/README.md +++ b/comps/reranks/tei/README.md @@ -51,7 +51,7 @@ export TEI_RERANKING_ENDPOINT="http://${your_ip}:8808" ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../ docker build -t opea/reranking-tei:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/reranks/tei/Dockerfile . ``` diff --git a/comps/retrievers/README.md b/comps/retrievers/README.md index 9864c9ea56..eeba8860e6 100644 --- a/comps/retrievers/README.md +++ b/comps/retrievers/README.md @@ -8,20 +8,28 @@ Overall, this microservice provides robust backend support for applications requ ## Retriever Microservice with Redis -For details, please refer to this [readme](redis/README.md) +For details, please refer to this [langchain readme](redis/langchain/README.md) or [llama_index readme](redis/llama_index/README.md) ## Retriever Microservice with Milvus -For details, please refer to this [readme](milvus/README.md) +For details, please refer to this [readme](milvus/langchain/README.md) ## Retriever Microservice with PGVector -For details, please refer to this [readme](pgvector/README.md) +For details, please refer to this [readme](pgvector/langchain/README.md) ## Retriever Microservice with Pathway -For details, please refer to this [readme](pathway/README.md) +For details, please refer to this [readme](pathway/langchain/README.md) + +## Retriever Microservice with QDrant + +For details, please refer to this [readme](qdrant/haystack/README.md) ## Retriever Microservice with VDMS -For details, please refer to this [readme](vdms/README.md) +For details, please refer to this [readme](vdms/langchain/README.md) + +## Retriever Microservice with Multimodal + +For details, please refer to this [readme](multimodal/redis/langchain/README.md) diff --git a/comps/retrievers/milvus/langchain/README.md b/comps/retrievers/milvus/langchain/README.md index f93d8f6f68..20d4f0ee62 100644 --- a/comps/retrievers/milvus/langchain/README.md +++ b/comps/retrievers/milvus/langchain/README.md @@ -61,7 +61,7 @@ curl http://${your_ip}:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ @@ -71,7 +71,7 @@ curl http://${your_ip}:7000/v1/retrieval \ You can set the parameters for the retriever. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity\", \"k\":4}" \ @@ -79,7 +79,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_distance_threshold\", \"k\":4, \"distance_threshold\":1.0}" \ @@ -87,7 +87,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_score_threshold\", \"k\":4, \"score_threshold\":0.2}" \ @@ -95,7 +95,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"mmr\", \"k\":4, \"fetch_k\":20, \"lambda_mult\":0.5}" \ diff --git a/comps/retrievers/multimodal/redis/langchain/README.md b/comps/retrievers/multimodal/redis/langchain/README.md index 05675f08f2..bdd1fb2ad5 100644 --- a/comps/retrievers/multimodal/redis/langchain/README.md +++ b/comps/retrievers/multimodal/redis/langchain/README.md @@ -29,7 +29,7 @@ docker run -d --name="redis-vector-db" -p 6379:6379 -p 8001:8001 redis/redis-sta ### 1.3 Ingest images or video -Upload a video or images using the dataprep microservice, instructions can be found [here](https://github.com/opea-project/GenAIComps/tree/main/comps/dataprep/redis/multimodal_langchain/README.md). +Upload a video or images using the dataprep microservice, instructions can be found [here](https://github.com/opea-project/GenAIComps/blob/main/comps/dataprep/multimodal/redis/langchain/README.md). ### 1.4 Start Retriever Service @@ -50,7 +50,7 @@ export INDEX_NAME=${your_index_name} ### 2.2 Build Docker Image ```bash -cd ../../../../ +cd ../../../../../ docker build -t opea/multimodal-retriever-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/multimodal/redis/langchain/Dockerfile . ``` @@ -81,7 +81,7 @@ docker compose -f docker_compose_retriever.yaml up -d To consume the Retriever Microservice, you can generate a mock embedding vector of length 512 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") curl http://${your_ip}:7000/v1/multimodal_retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ @@ -91,7 +91,7 @@ curl http://${your_ip}:7000/v1/multimodal_retrieval \ You can set the parameters for the retriever. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") curl http://localhost:7000/v1/multimodal_retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity\", \"k\":4}" \ @@ -99,7 +99,7 @@ curl http://localhost:7000/v1/multimodal_retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") curl http://localhost:7000/v1/multimodal_retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_distance_threshold\", \"k\":4, \"distance_threshold\":1.0}" \ @@ -107,7 +107,7 @@ curl http://localhost:7000/v1/multimodal_retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") curl http://localhost:7000/v1/multimodal_retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_score_threshold\", \"k\":4, \"score_threshold\":0.2}" \ @@ -115,7 +115,7 @@ curl http://localhost:7000/v1/multimodal_retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(512)]; print(embedding)") curl http://localhost:7000/v1/multimodal_retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"mmr\", \"k\":4, \"fetch_k\":20, \"lambda_mult\":0.5}" \ diff --git a/comps/retrievers/pathway/langchain/README.md b/comps/retrievers/pathway/langchain/README.md index 3411d47d25..13b5ffa2a1 100644 --- a/comps/retrievers/pathway/langchain/README.md +++ b/comps/retrievers/pathway/langchain/README.md @@ -96,7 +96,7 @@ curl http://0.0.0.0:7000/v1/health_check -X GET -H 'Content-Type: applicatio send an example query: ```bash -exm_embeddings=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export exm_embeddings=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://0.0.0.0:7000/v1/retrieval -X POST -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${exm_embeddings}}" -H 'Content-Type: application/json' ``` diff --git a/comps/retrievers/pgvector/langchain/README.md b/comps/retrievers/pgvector/langchain/README.md index e5ad6b5243..2b6cb09cd9 100644 --- a/comps/retrievers/pgvector/langchain/README.md +++ b/comps/retrievers/pgvector/langchain/README.md @@ -110,7 +110,7 @@ curl http://localhost:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ diff --git a/comps/retrievers/qdrant/haystack/README.md b/comps/retrievers/qdrant/haystack/README.md index ab9af611ef..017e7dc403 100644 --- a/comps/retrievers/qdrant/haystack/README.md +++ b/comps/retrievers/qdrant/haystack/README.md @@ -25,7 +25,7 @@ export INDEX_NAME=${your_index_name} ```bash export TEI_EMBEDDING_ENDPOINT="http://${your_ip}:6060" -python haystack/qdrant/retriever_qdrant.py +python retriever_qdrant.py ``` ## 2. ๐Ÿš€Start Microservice with Docker (Option 2) @@ -41,7 +41,7 @@ export TEI_EMBEDDING_ENDPOINT="http://${your_ip}:6060" ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/retriever-qdrant:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/qdrant/haystack/Dockerfile . ``` @@ -66,7 +66,7 @@ curl http://${your_ip}:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ diff --git a/comps/retrievers/redis/langchain/README.md b/comps/retrievers/redis/langchain/README.md index 832374beb6..db31611928 100644 --- a/comps/retrievers/redis/langchain/README.md +++ b/comps/retrievers/redis/langchain/README.md @@ -68,7 +68,7 @@ export HUGGINGFACEHUB_API_TOKEN=${your_hf_token} ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/retriever-redis:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/redis/langchain/Dockerfile . ``` @@ -106,7 +106,7 @@ curl http://localhost:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ @@ -116,7 +116,7 @@ curl http://${your_ip}:7000/v1/retrieval \ You can set the parameters for the retriever. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity\", \"k\":4}" \ @@ -124,7 +124,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_distance_threshold\", \"k\":4, \"distance_threshold\":1.0}" \ @@ -132,7 +132,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_score_threshold\", \"k\":4, \"score_threshold\":0.2}" \ @@ -140,7 +140,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"mmr\", \"k\":4, \"fetch_k\":20, \"lambda_mult\":0.5}" \ diff --git a/comps/retrievers/redis/llama_index/README.md b/comps/retrievers/redis/llama_index/README.md index be18f1589a..9c3bca027e 100644 --- a/comps/retrievers/redis/llama_index/README.md +++ b/comps/retrievers/redis/llama_index/README.md @@ -85,7 +85,7 @@ curl http://localhost:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ diff --git a/comps/retrievers/vdms/langchain/README.md b/comps/retrievers/vdms/langchain/README.md index 65facd524e..489df71c85 100644 --- a/comps/retrievers/vdms/langchain/README.md +++ b/comps/retrievers/vdms/langchain/README.md @@ -83,7 +83,7 @@ export TEI_EMBEDDING_ENDPOINT="http://${your_ip}:6060" ### 2.2 Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/retriever-vdms:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/retrievers/vdms/langchain/Dockerfile . ``` @@ -121,7 +121,7 @@ curl http://localhost:7000/v1/health_check \ To consume the Retriever Microservice, you can generate a mock embedding vector of length 768 with Python. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://${your_ip}:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding}}" \ @@ -131,7 +131,7 @@ curl http://${your_ip}:7000/v1/retrieval \ You can set the parameters for the retriever. ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity\", \"k\":4}" \ @@ -139,7 +139,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_distance_threshold\", \"k\":4, \"distance_threshold\":1.0}" \ @@ -147,7 +147,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"similarity_score_threshold\", \"k\":4, \"score_threshold\":0.2}" \ @@ -155,7 +155,7 @@ curl http://localhost:7000/v1/retrieval \ ``` ```bash -your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") +export your_embedding=$(python -c "import random; embedding = [random.uniform(-1, 1) for _ in range(768)]; print(embedding)") curl http://localhost:7000/v1/retrieval \ -X POST \ -d "{\"text\":\"What is the revenue of Nike in 2023?\",\"embedding\":${your_embedding},\"search_type\":\"mmr\", \"k\":4, \"fetch_k\":20, \"lambda_mult\":0.5}" \ diff --git a/comps/tts/Dockerfile b/comps/tts/Dockerfile deleted file mode 100644 index eca35bbefd..0000000000 --- a/comps/tts/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2024 Intel Corporation -# SPDX-License-Identifier: Apache-2.0 - -FROM python:3.11-slim -RUN useradd -m -s /bin/bash user && \ - mkdir -p /home/user && \ - chown -R user /home/user/ -USER user -ENV LANG=C.UTF-8 -ARG ARCH=cpu - -COPY comps /home/user/comps - -RUN pip install --no-cache-dir --upgrade pip && \ - if [ "${ARCH}" = "cpu" ]; then \ - pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu ; \ - pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu -r /home/user/comps/tts/requirements.txt ; \ - else \ - pip install --no-cache-dir -r /home/user/comps/tts/requirements.txt ; \ - fi - -ENV PYTHONPATH=$PYTHONPATH:/home/user - -WORKDIR /home/user/comps/tts - -ENTRYPOINT ["python", "tts.py"] diff --git a/comps/tts/speecht5/README.md b/comps/tts/speecht5/README.md index ed6c42c34c..4539a24a8e 100644 --- a/comps/tts/speecht5/README.md +++ b/comps/tts/speecht5/README.md @@ -7,7 +7,7 @@ TTS (Text-To-Speech) microservice helps users convert text to speech. When build - Xeon CPU ```bash -cd server/ +cd dependency/ nohup python speecht5_server.py --device=cpu & curl http://localhost:7055/v1/tts -XPOST -d '{"text": "Who are you?"}' -H 'Content-Type: application/json' ``` @@ -17,7 +17,7 @@ curl http://localhost:7055/v1/tts -XPOST -d '{"text": "Who are you?"}' -H 'Conte ```bash pip install optimum[habana] -cd server/ +cd dependency/ nohup python speecht5_server.py --device=hpu & curl http://localhost:7055/v1/tts -XPOST -d '{"text": "Who are you?"}' -H 'Content-Type: application/json' ``` @@ -41,14 +41,14 @@ Alternatively, you can start the TTS microservice with Docker. - Xeon CPU ```bash -cd ../.. +cd ../../../ docker build -t opea/speecht5:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/dependency/Dockerfile . ``` - Gaudi2 HPU ```bash -cd ../.. +cd ../../../ docker build -t opea/speecht5-gaudi:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/tts/speecht5/dependency/Dockerfile.intel_hpu . ``` diff --git a/comps/vectorstores/README.md b/comps/vectorstores/README.md index ab36306a89..004b44ab8d 100644 --- a/comps/vectorstores/README.md +++ b/comps/vectorstores/README.md @@ -22,15 +22,15 @@ For details, please refer to this [readme](pinecone/README.md) For details, please refer to this [readme](pathway/README.md) -# Vectorstores Microservice with Milvus +## Vectorstores Microservice with Milvus For details, please refer to this [readme](milvus/README.md) -# Vectorstores Microservice with LanceDB +## Vectorstores Microservice with LanceDB For details, please refer to this [readme](lancedb/README.md) -# Vectorstores Microservice with Chroma +## Vectorstores Microservice with Chroma For details, please refer to this [readme](chroma/README.md) diff --git a/comps/vectorstores/chroma/README.md b/comps/vectorstores/chroma/README.md index 1555930105..49bc674707 100644 --- a/comps/vectorstores/chroma/README.md +++ b/comps/vectorstores/chroma/README.md @@ -1,4 +1,6 @@ -# Introduction +# Start Chroma server + +## Introduction Chroma is a AI-native open-source vector database focused on developer productivity and happiness. Chroma is licensed under Apache 2.0. Chroma runs in various modes, we can deploy it as a server running your local machine or in the cloud. diff --git a/comps/vectorstores/lancedb/README.md b/comps/vectorstores/lancedb/README.md index bfe01585c2..27487fce06 100644 --- a/comps/vectorstores/lancedb/README.md +++ b/comps/vectorstores/lancedb/README.md @@ -1,4 +1,4 @@ -# LanceDB +# Start LanceDB Server LanceDB is an embedded vector database for AI applications. It is open source and distributed with an Apache-2.0 license. diff --git a/comps/web_retrievers/chroma/langchain/README.md b/comps/web_retrievers/chroma/langchain/README.md index 05cb2fc851..49e741a8e3 100644 --- a/comps/web_retrievers/chroma/langchain/README.md +++ b/comps/web_retrievers/chroma/langchain/README.md @@ -7,7 +7,7 @@ The Web Retriever Microservice is designed to efficiently search web pages relev ### Build Docker Image ```bash -cd ../../ +cd ../../../../ docker build -t opea/web-retriever-chroma:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f comps/web_retrievers/chroma/langchain/Dockerfile . ```