Browse Source

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

tags/0.8.3
Wang Bo 1 year ago
parent
commit
6f222b49f2
No account linked to committer's email address

+ 1
- 1
api/core/model_runtime/model_providers/jina/text_embedding/text_embedding.py 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))

Loading…
Cancel
Save