Documentation ¶
Overview ¶
Retrieves configuration information for a trained inference model.
Index ¶
- Variables
- type GetTrainedModels
- func (r *GetTrainedModels) AllowNoMatch(allownomatch bool) *GetTrainedModels
- func (r *GetTrainedModels) DecompressDefinition(decompressdefinition bool) *GetTrainedModels
- func (r GetTrainedModels) Do(providedCtx context.Context) (*Response, error)
- func (r *GetTrainedModels) ExcludeGenerated(excludegenerated bool) *GetTrainedModels
- func (r *GetTrainedModels) From(from int) *GetTrainedModels
- func (r *GetTrainedModels) Header(key, value string) *GetTrainedModels
- func (r *GetTrainedModels) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *GetTrainedModels) Include(include include.Include) *GetTrainedModels
- func (r GetTrainedModels) IsSuccess(providedCtx context.Context) (bool, error)
- func (r *GetTrainedModels) ModelId(modelid string) *GetTrainedModels
- func (r GetTrainedModels) Perform(providedCtx context.Context) (*http.Response, error)
- func (r *GetTrainedModels) Size(size int) *GetTrainedModels
- func (r *GetTrainedModels) Tags(tags string) *GetTrainedModels
- type NewGetTrainedModels
- type Response
Constants ¶
This section is empty.
Variables ¶
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 ¶
func New(tp elastictransport.Interface) *GetTrainedModels
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 ¶
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
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