-
Notifications
You must be signed in to change notification settings - Fork 25.3k
[Inference Timeout] Supply inference context to all third party services #131251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
29c7474
9ccf749
3a5ff05
c1c8f4f
908ba39
27a96ac
c7666a3
bfec42b
5422e22
5155b17
227507e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ | |
import org.elasticsearch.TransportVersion; | ||
import org.elasticsearch.TransportVersions; | ||
import org.elasticsearch.action.ActionListener; | ||
import org.elasticsearch.cluster.service.ClusterService; | ||
import org.elasticsearch.common.ValidationException; | ||
import org.elasticsearch.common.util.LazyInitializable; | ||
import org.elasticsearch.core.Nullable; | ||
|
@@ -19,6 +20,7 @@ | |
import org.elasticsearch.inference.ChunkedInference; | ||
import org.elasticsearch.inference.ChunkingSettings; | ||
import org.elasticsearch.inference.InferenceServiceConfiguration; | ||
import org.elasticsearch.inference.InferenceServiceExtension; | ||
import org.elasticsearch.inference.InferenceServiceResults; | ||
import org.elasticsearch.inference.InputType; | ||
import org.elasticsearch.inference.Model; | ||
|
@@ -85,8 +87,21 @@ public class AlibabaCloudSearchService extends SenderService { | |
InputType.INTERNAL_SEARCH | ||
); | ||
|
||
public AlibabaCloudSearchService(HttpRequestSender.Factory factory, ServiceComponents serviceComponents) { | ||
super(factory, serviceComponents); | ||
public AlibabaCloudSearchService( | ||
HttpRequestSender.Factory factory, | ||
ServiceComponents serviceComponents, | ||
InferenceServiceExtension.InferenceServiceFactoryContext context | ||
) { | ||
super(factory, serviceComponents, context); | ||
} | ||
|
||
// for testing | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick: I don't think we necessarily need this comment in all classes inheriting this constructor. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added these comments to stay consistent with the existing approach in classes like BaseElasticsearchInternalService and ElasticsearchInternalService Just to clarify, are you suggesting we remove these comments entirely from all the classes, or only from constructors that are simply forwarding to super without additional logic? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you want to keep them in, that's OK - it was a nitpick, but I thought they were potentially unnecessary. Non blocking comment though. 🙂 |
||
public AlibabaCloudSearchService( | ||
HttpRequestSender.Factory factory, | ||
ServiceComponents serviceComponents, | ||
ClusterService clusterService | ||
) { | ||
super(factory, serviceComponents, clusterService); | ||
} | ||
|
||
@Override | ||
|
Uh oh!
There was an error while loading. Please reload this page.