Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/changelog/140331.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 140331
summary: "[Inference API] Include rerank in supported tasks for IBM watsonx integration"
area: Inference
type: bug
issues:
- 140328
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"options": [
"text_embedding",
"chat_completion",
"completion"
"completion",
"rerank"
]
},
"watsonx_inference_id": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public void testGetServicesWithRerankTaskType() throws IOException {
"elastic",
"elasticsearch",
"googlevertexai",
"watsonxai",
"hugging_face",
"jinaai",
"test_reranking_service",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class IbmWatsonxService extends SenderService {
public static final String NAME = "watsonxai";

private static final String SERVICE_NAME = "IBM Watsonx";
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.TEXT_EMBEDDING);
private static final EnumSet<TaskType> supportedTaskTypes = EnumSet.of(TaskType.TEXT_EMBEDDING, TaskType.RERANK);

public IbmWatsonxService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents) {
super(factory, serviceComponents);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ public void testGetConfiguration() throws Exception {
{
"service": "watsonxai",
"name": "IBM Watsonx",
"task_types": ["text_embedding"],
"task_types": ["text_embedding", "rerank"],
"configurations": {
"project_id": {
"description": "",
Expand All @@ -950,7 +950,7 @@ public void testGetConfiguration() throws Exception {
"sensitive": false,
"updatable": false,
"type": "str",
"supported_task_types": ["text_embedding"]
"supported_task_types": ["text_embedding", "rerank"]
},
"model_id": {
"description": "The name of the model to use for the inference task.",
Expand All @@ -959,7 +959,7 @@ public void testGetConfiguration() throws Exception {
"sensitive": false,
"updatable": false,
"type": "str",
"supported_task_types": ["text_embedding"]
"supported_task_types": ["text_embedding", "rerank"]
},
"api_version": {
"description": "The IBM Watsonx API version ID to use.",
Expand All @@ -968,7 +968,7 @@ public void testGetConfiguration() throws Exception {
"sensitive": false,
"updatable": false,
"type": "str",
"supported_task_types": ["text_embedding"]
"supported_task_types": ["text_embedding", "rerank"]
},
"max_input_tokens": {
"description": "Allows you to specify the maximum number of tokens per input.",
Expand All @@ -986,7 +986,7 @@ public void testGetConfiguration() throws Exception {
"sensitive": false,
"updatable": false,
"type": "str",
"supported_task_types": ["text_embedding"]
"supported_task_types": ["text_embedding", "rerank"]
}
}
}
Expand Down