Skip to content

Commit

Permalink
fix requirements (#284)
Browse files Browse the repository at this point in the history
Signed-off-by: chensuyue <[email protected]>
  • Loading branch information
chensuyue authored Jul 9, 2024
1 parent f236949 commit f4b0298
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/docker_images_build_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case ${micro_service} in
"retrievers/langchain")
IMAGE_NAME="opea/retriever-redis"
;;
"reranks/langchain")
"reranks/tei")
IMAGE_NAME="opea/reranking-tei"
;;
"llms/text-generation/tgi")
Expand Down
2 changes: 2 additions & 0 deletions comps/llms/text-generation/tgi/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
aiohttp
docarray[full]
fastapi
httpx
huggingface_hub
langsmith
opentelemetry-api
Expand Down
2 changes: 2 additions & 0 deletions comps/reranks/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
aiohttp
docarray[full]
fastapi
httpx
langsmith
opentelemetry-api
opentelemetry-exporter-otlp
Expand Down
3 changes: 3 additions & 0 deletions comps/retrievers/llamaindex/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
aiohttp
docarray[full]
easyocr
fastapi
httpx
langsmith
llama-index-vector-stores-redis
llama_index
Expand All @@ -11,3 +13,4 @@ pymupdf
redis
sentence_transformers
shortuuid

17 changes: 12 additions & 5 deletions tests/test_reranks_langchain.sh → tests/test_reranks_tei.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ WORKPATH=$(dirname "$PWD")
ip_address=$(hostname -I | awk '{print $1}')
function build_docker_images() {
cd $WORKPATH
docker build --no-cache -t opea/reranking-tei:comps -f comps/reranks/langchain/docker/Dockerfile .
docker build --no-cache -t opea/reranking-tei:comps -f comps/reranks/tei/docker/Dockerfile .
}

function start_service() {
Expand All @@ -29,12 +29,19 @@ function start_service() {

function validate_microservice() {
tei_service_port=5007
http_proxy="" curl http://${ip_address}:${tei_service_port}/v1/reranking\
local CONTENT=$(curl http://${ip_address}:${tei_service_port}/v1/reranking \
-X POST \
-d '{"initial_query":"What is Deep Learning?", "retrieved_docs": [{"text":"Deep Learning is not..."}, {"text":"Deep learning is..."}]}' \
-H 'Content-Type: application/json'
docker logs test-comps-reranking-tei-server
docker logs test-comps-reranking-tei-endpoint
-H 'Content-Type: application/json')

if echo "$CONTENT" | grep -q "### Search results:"; then
echo "Content is as expected."
else
echo "Content does not match the expected result: $CONTENT"
docker logs test-comps-reranking-tei-server
docker logs test-comps-reranking-tei-endpoint
exit 1
fi
}

function stop_docker() {
Expand Down

0 comments on commit f4b0298

Please sign in to comment.