inference

package
v0.88.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*ai.Client
	ComputeEnvironment *ai.ComputeEnvironmentService
	Model              *ModelService
	Job                *ai.JobService
}

A Client manages communication with HSDP AI-Inference API

func NewClient

func NewClient(iamClient *iam.Client, config *ai.Config) (*Client, error)

NewClient returns a new HSDP AI-Inference API client. A configured IAM client must be provided as the underlying API requires an IAM token

type Model

type Model struct {
	ID                      string                         `json:"id,omitempty"`
	ResourceType            string                         `json:"resourceType"`
	Name                    string                         `json:"name" validate:"required"`
	Version                 string                         `json:"version" validate:"required"`
	Description             string                         `json:"description,omitempty"`
	ComputeEnvironment      ai.ReferenceComputeEnvironment `json:"computeEnvironment" validate:"required"`
	ArtifactPath            string                         `json:"artifactPath,omitempty"`
	SourceCode              ai.SourceCode                  `json:"sourceCode"`
	EntryCommands           []string                       `json:"entryCommands" validate:"required"`
	EnvVars                 []ai.EnvironmentVariable       `json:"envVars,omitempty"`
	Labels                  []string                       `json:"labels,omitempty"`
	Type                    string                         `json:"type,omitempty"`
	AdditionalConfiguration string                         `json:"additionalConfiguration,omitempty"`
	Created                 string                         `json:"created,omitempty"`
	CreatedBy               string                         `json:"createdBy,omitempty"`
}

type ModelService

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

func (*ModelService) CreateModel

func (s *ModelService) CreateModel(model Model) (*Model, *ai.Response, error)

func (*ModelService) DeleteModel

func (s *ModelService) DeleteModel(model Model) (*ai.Response, error)

func (*ModelService) GetModelByID

func (s *ModelService) GetModelByID(id string) (*Model, *ai.Response, error)

func (*ModelService) GetModels

func (s *ModelService) GetModels(opt *ai.GetOptions, options ...ai.OptionFunc) ([]Model, *ai.Response, error)

Jump to

Keyboard shortcuts

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