Record Class CompletionOperator.Factory
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.inference.completion.CompletionOperator.Factory
- All Implemented Interfaces:
Describable,Operator.OperatorFactory
- Enclosing class:
CompletionOperator
public static record CompletionOperator.Factory(InferenceService inferenceService, String inferenceId, EvalOperator.ExpressionEvaluator.Factory promptEvaluatorFactory)
extends Record
implements Operator.OperatorFactory
Factory for creating
CompletionOperator instances.-
Constructor Summary
ConstructorsConstructorDescriptionFactory(InferenceService inferenceService, String inferenceId, EvalOperator.ExpressionEvaluator.Factory promptEvaluatorFactory) Creates an instance of aFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()final booleanIndicates whether some other object is "equal to" this one.get(DriverContext driverContext) final inthashCode()Returns a hash code value for this object.Returns the value of theinferenceIdrecord component.Returns the value of theinferenceServicerecord component.Returns the value of thepromptEvaluatorFactoryrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Factory
public Factory(InferenceService inferenceService, String inferenceId, EvalOperator.ExpressionEvaluator.Factory promptEvaluatorFactory) Creates an instance of aFactoryrecord class.- Parameters:
inferenceService- the value for theinferenceServicerecord componentinferenceId- the value for theinferenceIdrecord componentpromptEvaluatorFactory- the value for thepromptEvaluatorFactoryrecord component
-
-
Method Details
-
describe
- Specified by:
describein interfaceDescribable
-
get
- Specified by:
getin interfaceOperator.OperatorFactory
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
inferenceService
Returns the value of theinferenceServicerecord component.- Returns:
- the value of the
inferenceServicerecord component
-
inferenceId
Returns the value of theinferenceIdrecord component.- Returns:
- the value of the
inferenceIdrecord component
-
promptEvaluatorFactory
Returns the value of thepromptEvaluatorFactoryrecord component.- Returns:
- the value of the
promptEvaluatorFactoryrecord component
-