Skip to content

Commit fa01f46

Browse files
fix tei embedding and tei reranking bug (#1256)
Signed-off-by: minmin-intel <[email protected]> Co-authored-by: Abolfazl Shahbazi <[email protected]>
1 parent 4ede405 commit fa01f46

File tree

2 files changed

+2
-0
lines changed
  • comps
    • embeddings/src/integrations
    • rerankings/src/integrations

2 files changed

+2
-0
lines changed

comps/embeddings/src/integrations/tei.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ async def invoke(self, input: EmbeddingRequest) -> EmbeddingResponse:
7070
raise TypeError("Unsupported input type: input must be a string or list of strings.")
7171
response = await self.client.post(
7272
json={"input": texts, "encoding_format": input.encoding_format, "model": input.model, "user": input.user},
73+
model=f"{self.base_url}/v1/embeddings",
7374
task="text-embedding",
7475
)
7576
embeddings = json.loads(response.decode())

comps/rerankings/src/integrations/tei.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ async def invoke(
7171

7272
response = await self.client.post(
7373
json={"query": query, "texts": docs},
74+
model=f"{self.base_url}/rerank",
7475
task="text-reranking",
7576
)
7677

0 commit comments

Comments
 (0)