You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Apache calls `consumeContent` once per batch, so it should be safe to
reuse the bytebuffer by resetting it after each invocation. This saves
on memory management a bit.
- Simplifying the initial response handling - we now invoke the listener
once we get the first set of bytes, either for a successful response
or a failure response, and we will now just verify the HttpResponse
status line on the first response. This helps with some pausing when
we received responses with just headers from some providers, and the
response is now smoother.
- Response conversion now happens completely within the Flow processor
rather than split between the processor and the response handler (so
future code can all be in one place).
Co-authored-by: Elastic Machine <[email protected]>
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/StreamingHttpResultPublisher.java
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/retry/ResponseHandler.java
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/retry/RetryingHttpSender.java
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,9 @@ public void tryAction(ActionListener<InferenceServiceResults> listener) {
116
116
try {
117
117
if (request.isStreaming() && responseHandler.canHandleStreamingResponses()) {
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/http/retry/StreamingResponseHandler.java
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/openai/OpenAiChatCompletionResponseHandler.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ public boolean canHandleStreamingResponses() {
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/response/amazonbedrock/completion/AmazonBedrockChatCompletionResponseListener.java
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/external/response/amazonbedrock/embeddings/AmazonBedrockEmbeddingsResponseListener.java
Copy file name to clipboardExpand all lines: x-pack/plugin/inference/src/test/java/org/elasticsearch/xpack/inference/external/http/StreamingHttpResultPublisherTests.java
0 commit comments