refactor: rename task_type to task for jina embeddings v3 (#8488)

This commit is contained in:
Wang Bo
2024-09-18 08:53:15 +02:00
committed by GitHub
parent 8dfe8c773a
commit 6f222b49f2

View File

@@ -57,7 +57,7 @@ class JinaTextEmbeddingModel(TextEmbeddingModel):
data = {"model": model, "input": [transform_jina_input_text(model, text) for text in texts]}
if model == "jina-embeddings-v3":
data["task_type"] = "retrieval.passage"
data["task"] = "text-matching"
try:
response = post(url, headers=headers, data=dumps(data))