java.lang.Object
org.elasticsearch.inference.ModelConfigurations
- All Implemented Interfaces:
NamedWriteable,VersionedNamedWriteable,Writeable,ToFilteredXContentObject,ToXContent,ToXContentObject
public class ModelConfigurations
extends Object
implements ToFilteredXContentObject, VersionedNamedWriteable
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings) Allows no task settings to be defined.ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, ChunkingSettings chunkingSettings) ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, TaskSettings taskSettings) ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, TaskSettings taskSettings, ChunkingSettings chunkingSettings) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe minimal version of the recipient this object can be sent toReturns the name of the writeable objectinthashCode()static ModelConfigurationsof(Model model, ServiceSettings serviceSettings) static ModelConfigurationsof(Model model, TaskSettings taskSettings) toFilteredXContent(XContentBuilder builder, ToXContent.Params params) Returns aXContentBuilderwhich has some fields removed from the response content.toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
INDEX_ONLY_ID_FIELD_NAME
- See Also:
-
INFERENCE_ID_FIELD_NAME
- See Also:
-
USE_ID_FOR_INDEX
- See Also:
-
SERVICE
- See Also:
-
SERVICE_SETTINGS
- See Also:
-
TASK_SETTINGS
- See Also:
-
CHUNKING_SETTINGS
- See Also:
-
-
Constructor Details
-
ModelConfigurations
public ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings) Allows no task settings to be defined. This will default to theEmptyTaskSettingsobject. -
ModelConfigurations
public ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, ChunkingSettings chunkingSettings) -
ModelConfigurations
public ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, TaskSettings taskSettings) -
ModelConfigurations
public ModelConfigurations(String inferenceEntityId, TaskType taskType, String service, ServiceSettings serviceSettings, TaskSettings taskSettings, ChunkingSettings chunkingSettings) -
ModelConfigurations
- Throws:
IOException
-
-
Method Details
-
of
-
of
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getInferenceEntityId
-
getTaskType
-
getService
-
getServiceSettings
-
getTaskSettings
-
getChunkingSettings
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
toFilteredXContent
public XContentBuilder toFilteredXContent(XContentBuilder builder, ToXContent.Params params) throws IOException Description copied from interface:ToFilteredXContentObjectReturns aXContentBuilderwhich has some fields removed from the response content.- Specified by:
toFilteredXContentin interfaceToFilteredXContentObject- Throws:
IOException
-
getWriteableName
Description copied from interface:VersionedNamedWriteableReturns the name of the writeable object- Specified by:
getWriteableNamein interfaceNamedWriteable- Specified by:
getWriteableNamein interfaceVersionedNamedWriteable
-
getMinimalSupportedVersion
Description copied from interface:VersionedNamedWriteableThe minimal version of the recipient this object can be sent to- Specified by:
getMinimalSupportedVersionin interfaceVersionedNamedWriteable
-
equals
-
hashCode
public int hashCode()
-