gettrainedmodels

package
v8.8.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: Apache-2.0 Imports: 14 Imported by: 4

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(b 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(b 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

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

func (*GetTrainedModels) ExcludeGenerated

func (r *GetTrainedModels) ExcludeGenerated(b 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

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

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

func (GetTrainedModels) IsSuccess

func (r GetTrainedModels) IsSuccess(ctx 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(v 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(ctx context.Context) (*http.Response, error)

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

func (*GetTrainedModels) Size

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

func (*GetTrainedModels) Tags

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"`
}

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