diff --git a/comps/intent_detection/langchain/intent_detection.py b/comps/intent_detection/langchain/intent_detection.py index 17b9bd4a7..3abd6974c 100644 --- a/comps/intent_detection/langchain/intent_detection.py +++ b/comps/intent_detection/langchain/intent_detection.py @@ -5,7 +5,6 @@ from langchain import LLMChain, PromptTemplate from langchain_community.llms import HuggingFaceEndpoint -from template import IntentTemplate from comps import GeneratedDoc, LLMParamsDoc, ServiceType, opea_microservices, register_microservice diff --git a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh index b6b1b5da6..b4a13d5fb 100644 --- a/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh +++ b/comps/llms/text-generation/vllm/langchain/dependency/build_docker_vllm.sh @@ -30,7 +30,7 @@ fi # Build the docker image for vLLM based on the hardware mode if [ "$hw_mode" = "hpu" ]; then - docker build -f docker/Dockerfile.Intel_HPU -t opea/vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy + docker build -f docker/Dockerfile.intel_hpu -t opea/vllm:hpu --shm-size=128g . --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy else git clone https://github.com/vllm-project/vllm.git cd ./vllm/ diff --git a/comps/lvms/tgi-llava/template.py b/comps/lvms/tgi-llava/template.py new file mode 100644 index 000000000..71c2b2667 --- /dev/null +++ b/comps/lvms/tgi-llava/template.py @@ -0,0 +1,10 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + + +class ChatTemplate: + + @staticmethod + def generate_multimodal_rag_on_videos_prompt(question: str, context: str): + template = """The transcript associated with the image is '{context}'. {question}""" + return template.format(context=context, question=question) diff --git a/tests/embeddings/test_embeddings_tei_langchain.sh b/tests/embeddings/test_embeddings_tei_langchain.sh index 4031343b2..9dab9ee90 100644 --- a/tests/embeddings/test_embeddings_tei_langchain.sh +++ b/tests/embeddings/test_embeddings_tei_langchain.sh @@ -20,7 +20,7 @@ function build_docker_images() { } function start_service() { - tei_endpoint=5001= + tei_endpoint=5001 model="BAAI/bge-base-en-v1.5" unset http_proxy docker run -d --name="test-comps-embedding-tei-endpoint" -p $tei_endpoint:80 -v ./data:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-1.5 --model-id $model diff --git a/tests/intent_detection/test_intent_detection_langchain.sh b/tests/intent_detection/test_intent_detection_langchain.sh index 1d6e0f061..ffc488b3f 100644 --- a/tests/intent_detection/test_intent_detection_langchain.sh +++ b/tests/intent_detection/test_intent_detection_langchain.sh @@ -40,7 +40,7 @@ function start_service() { function validate_microservice() { intent_port=5043 - result=$(http_proxy="" curl http://${ip_address}:${intent_port}/v1/chat/intent\ + result=$(http_proxy="" curl http://localhost:${intent_port}/v1/chat/intent\ -X POST \ -d '{"query":"What is Deep Learning?","max_new_tokens":10,"top_k":1,"temperature":0.001,"streaming":false}' \ -H 'Content-Type: application/json')