gettrainedmodels

package
v8.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 3

Documentation

Overview

Retrieves configuration information for a trained inference model.

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 New

Retrieves configuration information for a trained inference model.

https://www.elastic.co/guide/en/elasticsearch/reference/current/get-trained-models.html

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) 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) 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) 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. 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) 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/5bf86339cd4bda77d07f6eaa6789b72f9c0279b1/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