Skip to content

Commit 5a13238

Browse files
Remove canHandleStreamingResponses
1 parent 2e618dc commit 5a13238

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/action/ibmwatsonx/IbmWatsonxActionCreator.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class IbmWatsonxActionCreator implements IbmWatsonxActionVisitor {
2828
private final ServiceComponents serviceComponents;
2929

3030
public IbmWatsonxActionCreator(Sender sender, ServiceComponents serviceComponents) {
31-
// TODO Batching - accept a class that can handle batching
3231
this.sender = Objects.requireNonNull(sender);
3332
this.serviceComponents = Objects.requireNonNull(serviceComponents);
3433
}

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/sender/IbmWatsonxEmbeddingsRequestManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class IbmWatsonxEmbeddingsRequestManager extends IbmWatsonxRequestManager
3333
private static final ResponseHandler HANDLER = createEmbeddingsHandler();
3434

3535
private static ResponseHandler createEmbeddingsHandler() {
36-
return new IbmWatsonxResponseHandler("ibm watsonx embeddings", IbmWatsonxEmbeddingsResponseEntity::fromResponse, false);
36+
return new IbmWatsonxResponseHandler("ibm watsonx embeddings", IbmWatsonxEmbeddingsResponseEntity::fromResponse);
3737
}
3838

3939
private final IbmWatsonxEmbeddingsModel model;

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/sender/IbmWatsonxRerankRequestManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ public class IbmWatsonxRerankRequestManager extends IbmWatsonxRequestManager {
3030
private static ResponseHandler createIbmWatsonxResponseHandler() {
3131
return new IbmWatsonxResponseHandler(
3232
"ibm watsonx rerank",
33-
(request, response) -> IbmWatsonxRankedResponseEntity.fromResponse(response),
34-
false
33+
(request, response) -> IbmWatsonxRankedResponseEntity.fromResponse(response)
3534
);
3635
}
3736

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/ibmwatsonx/IbmWatsonxResponseHandler.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@
1717
import static org.elasticsearch.core.Strings.format;
1818

1919
public class IbmWatsonxResponseHandler extends BaseResponseHandler {
20-
21-
private final boolean canHandleStreamingResponse;
22-
23-
public IbmWatsonxResponseHandler(String requestType, ResponseParser parseFunction, boolean canHandleStreamingResponse) {
20+
public IbmWatsonxResponseHandler(String requestType, ResponseParser parseFunction) {
2421
super(requestType, parseFunction, IbmWatsonxErrorResponseEntity::fromResponse);
25-
this.canHandleStreamingResponse = canHandleStreamingResponse;
26-
}
27-
28-
public boolean canHandleStreamingResponses() {
29-
return canHandleStreamingResponse;
3022
}
3123

3224
/**

0 commit comments

Comments
 (0)