gettrainedmodels

package
v8.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Overview

Get trained model configuration info.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type GetTrainedModels

type GetTrainedModels struct {
	// contains filtered or unexported fields
}

func (*GetTrainedModels) AllowNoMatch

func (r *GetTrainedModels) AllowNoMatch(allownomatch bool) *GetTrainedModels

AllowNoMatch Specifies what to do when the request:

- Contains wildcard expressions and there are no models that match. - Contains the _all string or no identifiers and there are no matches. - Contains wildcard expressions and there are only partial matches.

If true, it returns an empty array when there are no matches and the subset of results when there are partial matches. API name: allow_no_match

func (*GetTrainedModels) DecompressDefinition

func (r *GetTrainedModels) DecompressDefinition(decompressdefinition bool) *GetTrainedModels

DecompressDefinition Specifies whether the included model definition should be returned as a JSON map (true) or in a custom compressed format (false). API name: decompress_definition

func (GetTrainedModels) Do

func (r GetTrainedModels) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a gettrainedmodels.Response

func (*GetTrainedModels) ErrorTrace added in v8.14.0

func (r *GetTrainedModels) ErrorTrace(errortrace bool) *GetTrainedModels

ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors when they occur. API name: error_trace

func (*GetTrainedModels) ExcludeGenerated

func (r *GetTrainedModels) ExcludeGenerated(excludegenerated bool) *GetTrainedModels

ExcludeGenerated Indicates if certain fields should be removed from the configuration on retrieval. This allows the configuration to be in an acceptable format to be retrieved and then added to another cluster. API name: exclude_generated

func (*GetTrainedModels) FilterPath added in v8.14.0

func (r *GetTrainedModels) FilterPath(filterpaths ...string) *GetTrainedModels

FilterPath Comma-separated list of filters in dot notation which reduce the response returned by Elasticsearch. API name: filter_path

func (*GetTrainedModels) From

func (r *GetTrainedModels) From(from int) *GetTrainedModels

From Skips the specified number of models. API name: from

func (*GetTrainedModels) Header

func (r *GetTrainedModels) Header(key, value string) *GetTrainedModels

Header set a key, value pair in the GetTrainedModels headers map.

func (*GetTrainedModels) HttpRequest

func (r *GetTrainedModels) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*GetTrainedModels) Human added in v8.14.0

func (r *GetTrainedModels) Human(human bool) *GetTrainedModels

Human When set to `true` will return statistics in a format suitable for humans. For example `"exists_time": "1h"` for humans and `"eixsts_time_in_millis": 3600000` for computers. When disabled the human readable values will be omitted. This makes sense for responses being consumed only by machines. API name: human

func (*GetTrainedModels) Include

func (r *GetTrainedModels) Include(include include.Include) *GetTrainedModels

Include A comma delimited string of optional fields to include in the response body. API name: include

func (GetTrainedModels) IsSuccess

func (r GetTrainedModels) IsSuccess(providedCtx context.Context) (bool, error)

IsSuccess allows to run a query with a context and retrieve the result as a boolean. This only exists for endpoints without a request payload and allows for quick control flow.

func (*GetTrainedModels) ModelId

func (r *GetTrainedModels) ModelId(modelid string) *GetTrainedModels

ModelId The unique identifier of the trained model or a model alias.

You can get information for multiple trained models in a single API request by using a comma-separated list of model IDs or a wildcard expression. API Name: modelid

func (GetTrainedModels) Perform added in v8.7.0

func (r GetTrainedModels) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*GetTrainedModels) Pretty added in v8.14.0

func (r *GetTrainedModels) Pretty(pretty bool) *GetTrainedModels

Pretty If set to `true` the returned JSON will be "pretty-formatted". Only use this option for debugging only. API name: pretty

func (*GetTrainedModels) Size

func (r *GetTrainedModels) Size(size int) *GetTrainedModels

Size Specifies the maximum number of models to obtain. API name: size

func (*GetTrainedModels) Tags

func (r *GetTrainedModels) Tags(tags ...string) *GetTrainedModels

Tags A comma delimited string of tags. A trained model can have many tags, or none. When supplied, only trained models that contain all the supplied tags are returned. API name: tags

type NewGetTrainedModels

type NewGetTrainedModels func() *GetTrainedModels

NewGetTrainedModels type alias for index.

func NewGetTrainedModelsFunc

func NewGetTrainedModelsFunc(tp elastictransport.Interface) NewGetTrainedModels

NewGetTrainedModelsFunc returns a new instance of GetTrainedModels with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Response added in v8.7.0

type Response struct {
	Count int `json:"count"`
	// TrainedModelConfigs An array of trained model resources, which are sorted by the model_id value
	// in ascending order.
	TrainedModelConfigs []types.TrainedModelConfig `json:"trained_model_configs"`
}

Response holds the response body struct for the package gettrainedmodels

https://github.com/elastic/elasticsearch-specification/blob/4fcf747dfafc951e1dcf3077327e3dcee9107db3/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34

func NewResponse added in v8.7.0

func NewResponse() *Response

NewResponse returns a Response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL