client

package
v0.1.27 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CredentialTypeBasic                             string = "basic"
	CredentialTypeApiToken                          string = "api_token"
	CredentialTypeS3                                string = "s3"
	CredentialTypeGCP                               string = "gcp"
	CredentialTypeAzure                             string = "azure"
	CredentialTypeAzureServicePrincipal             string = "azure_service_principal"
	CredentialTypeSnowflakeOAuthUserAccount         string = "snowflake_oauth_user_account"
	CredentialTypeADLSGen2OAuth                     string = "adls_gen2_oauth"
	CredentialTypeSnowflakeKeyPairUserAccount       string = "snowflake_key_pair_user_account"
	CredentialTypeDatabricksAccessTokenAccount      string = "databricks_access_token_account"
	CredentialTypeDatabricksServicePrincipalAccount string = "databricks_service_principal_account"
	CredentialTypeSAPOAuth                          string = "sap_oauth"
)
View Source
const (
	RuntimeParameterTypeBoolean    string = "boolean"
	RuntimeParameterTypeCredential string = "credential"
	RuntimeParameterTypeNumeric    string = "numeric"
	RuntimeParameterTypeString     string = "string"
)
View Source
const DefaultEndpoint string = "https://app.datarobot.com/api/v2"

Variables

This section is empty.

Functions

func Delete

func Delete(c *Client, ctx context.Context, path string) (err error)

func Get

func Get[T any](c *Client, ctx context.Context, path string) (*T, error)

func Patch

func Patch[T any](c *Client, ctx context.Context, path string, body any) (*T, error)

func PatchAndExpectStatus added in v0.0.14

func PatchAndExpectStatus[T any](c *Client, ctx context.Context, path string, body any) (*T, string, error)

func Post

func Post[T any](c *Client, ctx context.Context, path string, body any) (*T, error)

func Put

func Put[T any](c *Client, ctx context.Context, path string, body any) (*T, error)

Types

type Application added in v0.0.15

type Application struct {
	ID                               string   `json:"id"`
	Name                             string   `json:"name"`
	Status                           string   `json:"status"`
	CustomApplicationSourceID        string   `json:"customApplicationSourceId"`
	CustomApplicationSourceVersionID string   `json:"customApplicationSourceVersionId"`
	ApplicationUrl                   string   `json:"applicationUrl"`
	ExternalAccessEnabled            bool     `json:"externalAccessEnabled"`
	ExternalAccessRecipients         []string `json:"externalAccessRecipients"`
}

type ApplicationResources added in v0.0.13

type ApplicationResources struct {
	Replicas int64 `json:"replicas,omitempty"`
}

type ApplicationSource added in v0.0.13

type ApplicationSource struct {
	ID            string                   `json:"id"`
	Name          string                   `json:"name"`
	LatestVersion ApplicationSourceVersion `json:"latestVersion"`
}

type ApplicationSourceVersion added in v0.0.13

type ApplicationSourceVersion struct {
	ID                       string               `json:"id"`
	Label                    string               `json:"label"`
	BaseEnvironmentID        string               `json:"baseEnvironmentId,omitempty"`
	BaseEnvironmentVersionID string               `json:"baseEnvironmentVersionId"`
	IsFrozen                 bool                 `json:"isFrozen"`
	RuntimeParameters        []RuntimeParameter   `json:"runtimeParameters,omitempty"`
	Items                    []FileItem           `json:"items,omitempty"`
	Resources                ApplicationResources `json:"resources,omitempty"`
}

type AssociationIDSetting

type AssociationIDSetting struct {
	AutoGenerateID               bool     `json:"autoGenerateId"`
	RequiredInPredictionRequests bool     `json:"requiredInPredictionRequests"`
	ColumnNames                  []string `json:"columnNames,omitempty"`
}

type BasicSetting

type BasicSetting struct {
	Enabled bool `json:"enabled"`
}

type ChunkingParameters

type ChunkingParameters struct {
	ChunkOverlapPercentage int64    `json:"chunkOverlapPercentage"`
	ChunkSize              int64    `json:"chunkSize"`                // Value must be greater than or equal to 128
	ChunkingMethod         string   `json:"chunkingMethod"`           // [recursive, semantic]
	EmbeddingModel         string   `json:"embeddingModel,omitempty"` // [intfloat/e5-large-v2, intfloat/e5-base-v2, intfloat/multilingual-e5-base, sentence-transformers/all-MiniLM-L6-v2, jinaai/jina-embedding-t-en-v1, cl-nagoya/sup-simcse-ja-base]
	EmbeddingValidationId  string   `json:"embeddingValidationId,omitempty"`
	IsSeparatorRegex       bool     `json:"isSeparatorRegex,omitempty"`
	Separators             []string `json:"separators"`
}

type Client

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

func NewClient

func NewClient(cfg *Configuration) *Client

type Configuration

type Configuration struct {
	UserAgent  string `json:"userAgent,omitempty"`
	Debug      bool   `json:"debug,omitempty"`
	Endpoint   string
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

Configuration represents the configuration for the client.

func NewConfiguration

func NewConfiguration(token string) *Configuration

NewConfiguration returns a new Configuration object.

type CreateApplicationFromSourceRequest added in v0.0.13

type CreateApplicationFromSourceRequest struct {
	ApplicationSourceVersionID string `json:"applicationSourceVersionId"`
}

type CreateApplicationSourceVersionRequest added in v0.0.13

type CreateApplicationSourceVersionRequest struct {
	Label                  string               `json:"label"`
	BaseVersion            string               `json:"baseVersion,omitempty"`
	BaseEnvironmentID      string               `json:"baseEnvironmentId,omitempty"`
	Resources              ApplicationResources `json:"resources,omitempty"`
	RuntimeParameterValues string               `json:"runtimeParameterValues,omitempty"`
}

type CreateCustomModelFromLLMBlueprintRequest

type CreateCustomModelFromLLMBlueprintRequest struct {
	LLMBlueprintID string `json:"llmBlueprintId"`
}

type CreateCustomModelRequest

type CreateCustomModelRequest struct {
	Name                string   `json:"name"`
	TargetType          string   `json:"targetType"`
	CustomModelType     string   `json:"customModelType"`
	TargetName          string   `json:"targetName,omitempty"`
	NegativeClassLabel  string   `json:"negativeClassLabel,omitempty"`
	PositiveClassLabel  string   `json:"positiveClassLabel,omitempty"`
	PredictionThreshold float64  `json:"predictionThreshold,omitempty"`
	Description         string   `json:"description,omitempty"`
	IsProxyModel        bool     `json:"isProxyModel,omitempty"`
	Language            string   `json:"language,omitempty"`
	ClassLabels         []string `json:"classLabels,omitempty"`
}

type CreateCustomModelVersionFromFilesRequest

type CreateCustomModelVersionFromFilesRequest struct {
	BaseEnvironmentID string     `json:"baseEnvironmentId"`
	Files             []FileInfo `json:"files"`
}

type CreateCustomModelVersionFromGuardsConfigurationRequest

type CreateCustomModelVersionFromGuardsConfigurationRequest struct {
	CustomModelID string                         `json:"customModelId"`
	Data          []GuardConfiguration           `json:"data"`
	OverallConfig OverallModerationConfiguration `json:"overallConfig"`
}

type CreateCustomModelVersionFromGuardsConfigurationResponse

type CreateCustomModelVersionFromGuardsConfigurationResponse struct {
	CustomModelVersionID string `json:"customModelVersionId"`
}

type CreateCustomModelVersionFromLLMBlueprintResponse

type CreateCustomModelVersionFromLLMBlueprintResponse struct {
	CustomModelID string `json:"customModelId"`
}

type CreateCustomModelVersionFromLatestRequest added in v0.0.21

type CreateCustomModelVersionFromLatestRequest struct {
	IsMajorUpdate            string   `json:"isMajorUpdate"`
	BaseEnvironmentID        string   `json:"baseEnvironmentId,omitempty"`
	BaseEnvironmentVersionID string   `json:"baseEnvironmentVersionId,omitempty"`
	RuntimeParameterValues   string   `json:"runtimeParameterValues,omitempty"`
	FilesToDelete            []string `json:"filesToDelete,omitempty"`
	Replicas                 int64    `json:"replicas,omitempty"`
	MaximumMemory            int64    `json:"maximumMemory,omitempty"`
	NetworkEgressPolicy      string   `json:"networkEgressPolicy,omitempty"`
	KeepTrainingHoldoutData  *bool    `json:"keepTrainingHoldoutData,omitempty"`
	TrainingData             string   `json:"trainingData,omitempty"`
	HoldoutData              string   `json:"holdoutData,omitempty"`
}

type CreateCustomModelVersionFromRemoteRepositoryRequest

type CreateCustomModelVersionFromRemoteRepositoryRequest struct {
	IsMajorUpdate     bool     `json:"isMajorUpdate"`
	BaseEnvironmentID string   `json:"baseEnvironmentId,omitempty"`
	RepositoryID      string   `json:"repositoryId,omitempty"`
	Ref               string   `json:"ref,omitempty"`
	SourcePath        []string `json:"sourcePath,omitempty"`
}

type CreateDatasetRequest

type CreateDatasetRequest struct {
	DoSnapshot bool `json:"doSnapshot"`
}

type CreateDatasetResponse

type CreateDatasetResponse struct {
	ID string `json:"datasetId"`
}

type CreateDatasetVersionResponse

type CreateDatasetVersionResponse struct {
	// The ID of the catalog entry.
	ID string `json:"catalogId"`
	// The ID of the latest version of the catalog entry.
	VersionID string `json:"catalogVersionId"`
	// ID that can be used with GET /api/v2/status/{statusId}/ to poll for the testing job's status.
	StatusID string `json:"statusId"`
}

type CreateDeploymentFromModelPackageRequest

type CreateDeploymentFromModelPackageRequest struct {
	ModelPackageID          string `json:"modelPackageId"`
	PredictionEnvironmentID string `json:"predictionEnvironmentId"`
	Label                   string `json:"label"`
	Importance              string `json:"importance,omitempty"`
}

type CreateLLMBlueprintRequest

type CreateLLMBlueprintRequest struct {
	Name                   string                  `json:"name"`
	PlaygroundID           string                  `json:"playgroundId"`
	Description            string                  `json:"description,omitempty"`
	VectorDatabaseID       string                  `json:"vectorDatabaseId,omitempty"`
	VectorDatabaseSettings *VectorDatabaseSettings `json:"vectorDatabaseSettings,omitempty"`
	LLMID                  string                  `json:"llmId,omitempty"`
	LLMSettings            *LLMSettings            `json:"llmSettings,omitempty"`
	PromptType             string                  `json:"promptType,omitempty"`
}

type CreatePlaygroundRequest

type CreatePlaygroundRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	UseCaseID   string `json:"useCaseId"`
}

type CreatePlaygroundResponse

type CreatePlaygroundResponse struct {
	ID string `json:"id"`
}

type CreatePredictionEnvironmentRequest

type CreatePredictionEnvironmentRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Platform    string `json:"platform"`
}

type CreateQAApplicationRequest added in v0.0.19

type CreateQAApplicationRequest struct {
	DeploymentID string `json:"deploymentId"`
}

type CreateRegisteredModelFromCustomModelRequest

type CreateRegisteredModelFromCustomModelRequest struct {
	CustomModelVersionID string `json:"customModelVersionId"`
	Name                 string `json:"name"`
	RegisteredModelName  string `json:"registeredModelName,omitempty"`
	Prompt               string `json:"prompt,omitempty"`

	// To create a new version of an existing registered model
	RegisteredModelID string `json:"registeredModelId,omitempty"`
}

type CreateRemoteRepositoryRequest

type CreateRemoteRepositoryRequest struct {
	Name         string `json:"name"`
	Description  string `json:"description"`
	Location     string `json:"location"`
	SourceType   string `json:"sourceType"`
	CredentialID string `json:"credentialId,omitempty"`
}

type CreateUseCaseResponse

type CreateUseCaseResponse struct {
	ID string `json:"id"`
}

type CreateVectorDatabaseRequest

type CreateVectorDatabaseRequest struct {
	DatasetID          string             `json:"datasetId"`
	Name               string             `json:"name"`
	UseCaseID          string             `json:"useCaseId"`
	ChunkingParameters ChunkingParameters `json:"chunkingParameters"`
}

type CreateVoidRequest

type CreateVoidRequest struct {
}

type CreateVoidResponse

type CreateVoidResponse struct {
}

type CredentialRequest

type CredentialRequest struct {
	Name               string  `json:"name"`
	Description        string  `json:"description,omitempty"`
	CredentialType     string  `json:"credentialType,omitempty"`
	ApiToken           string  `json:"apiToken,omitempty"`
	User               string  `json:"user,omitempty"`
	Password           string  `json:"password,omitempty"`
	Token              string  `json:"token,omitempty"`
	RefreshToken       string  `json:"refreshToken,omitempty"`
	GCPKey             *GCPKey `json:"gcpKey,omitempty"`
	AWSAccessKeyID     string  `json:"awsAccessKeyId,omitempty"`
	AWSSecretAccessKey string  `json:"awsSecretAccessKey,omitempty"`
	AWSSessionToken    string  `json:"awsSessionToken,omitempty"`
}

type CredentialResponse

type CredentialResponse struct {
	ID             string `json:"credentialId"`
	Name           string `json:"name"`
	Description    string `json:"description,omitempty"`
	CredentialType string `json:"credentialType,omitempty"`
}

type CustomModel added in v0.0.20

type CustomModel struct {
	ID                                          string             `json:"id"`
	Name                                        string             `json:"name"`
	Description                                 string             `json:"description"`
	LatestVersion                               CustomModelVersion `json:"latestVersion"`
	TargetType                                  string             `json:"targetType"`
	TargetName                                  string             `json:"targetName"`
	CustomModelType                             string             `json:"customModelType"`
	Language                                    string             `json:"language"`
	PositiveClassLabel                          string             `json:"positiveClassLabel"`
	NegativeClassLabel                          string             `json:"negativeClassLabel"`
	PredictionThreshold                         float64            `json:"predictionThreshold"`
	ClassLabels                                 []string           `json:"classLabels,omitempty"`
	IsTrainingDataForVersionsPermanentlyEnabled bool               `json:"isTrainingDataForVersionsPermanentlyEnabled"`
	IsProxyModel                                bool               `json:"isProxyModel"`
	DeploymentsCount                            int64              `json:"deploymentsCount"`
}

type CustomModelHoldoutData added in v0.0.21

type CustomModelHoldoutData struct {
	PartitionColumn *string `json:"partitionColumn,omitempty"`
}

type CustomModelTrainingData added in v0.0.21

type CustomModelTrainingData struct {
	DatasetID            string                       `json:"datasetId,omitempty"`
	DatasetVersionID     string                       `json:"datasetVersionId,omitempty"`
	DatasetName          string                       `json:"datasetName,omitempty"`
	AssignmentInProgress bool                         `json:"assignmentInProgress,omitempty"`
	AssignmentError      *TrainingDataAssignmentError `json:"assignmentError,omitempty"`
}

type CustomModelVersion added in v0.0.21

type CustomModelVersion struct {
	ID                       string                   `json:"id"`
	Description              string                   `json:"description"`
	CustomModelID            string                   `json:"customModelId"`
	BaseEnvironmentID        string                   `json:"baseEnvironmentId"`
	BaseEnvironmentVersionID string                   `json:"baseEnvironmentVersionId"`
	Dependencies             []Dependency             `json:"dependencies"`
	RuntimeParameters        []RuntimeParameter       `json:"runtimeParameters"`
	Items                    []FileItem               `json:"items"`
	MaximumMemory            *int64                   `json:"maximumMemory"`
	NetworkEgressPolicy      *string                  `json:"networkEgressPolicy"`
	Replicas                 *int64                   `json:"replicas"`
	TrainingData             *CustomModelTrainingData `json:"trainingData"`
	HoldoutData              *CustomModelHoldoutData  `json:"holdoutData"`
}

type DatasetResponse

type DatasetResponse struct {
	ID                       string `json:"datasetId"`
	Name                     string `json:"name"`
	VersionID                string `json:"versionId"`
	IsSnapshot               bool   `json:"isSnapshot"`
	Status                   string `json:"processingState"`
	IsVectorDatabaseEligible bool   `json:"isVectorDatabaseEligible"`
}

type Dependency added in v0.1.27

type Dependency struct {
	PackageName string `json:"packageName"`
}

type DependencyBuild added in v0.1.27

type DependencyBuild struct {
	BuildStatus string `json:"buildStatus"`
}

type DeploymentCreateResponse

type DeploymentCreateResponse struct {
	ID string `json:"id"`
}

type DeploymentRetrieveResponse

type DeploymentRetrieveResponse struct {
	ID                    string                `json:"id"`
	Label                 string                `json:"label"`
	Status                string                `json:"status"`
	Model                 Model                 `json:"model"`
	ModelPackage          ModelPackage          `json:"modelPackage"`
	PredictionEnvironment PredictionEnvironment `json:"predictionEnvironment"`
}

type DeploymentSettings

type DeploymentSettings struct {
	AssociationID             *AssociationIDSetting `json:"associationId,omitempty"`
	BatchMonitoring           *BasicSetting         `json:"batchMonitoring,omitempty"`
	ChallengerModels          *BasicSetting         `json:"challengerModels,omitempty"`
	FeatureDrift              *BasicSetting         `json:"featureDrift,omitempty"`
	Humility                  *BasicSetting         `json:"humility,omitempty"`
	PredictionsSettings       *PredictionsSettings  `json:"predictionsSettings,omitempty"`
	PredictionsDataCollection *BasicSetting         `json:"predictionsDataCollection,omitempty"`
	SegmentAnalysis           *BasicSetting         `json:"segmentAnalysis,omitempty"`
	TargetDrift               *BasicSetting         `json:"targetDrift,omitempty"`
}

type ExecutionEnvironment

type ExecutionEnvironment struct {
	ID            string                      `json:"id"`
	Name          string                      `json:"name"`
	Description   string                      `json:"description"`
	LatestVersion ExecutionEnvironmentVersion `json:"latestVersion"`
}

type ExecutionEnvironmentVersion

type ExecutionEnvironmentVersion struct {
	ID    string `json:"id"`
	Label string `json:"label"`
}

type FileInfo

type FileInfo struct {
	Name    string `json:"name,omitempty"`
	Path    string `json:"path,omitempty"`
	Content []byte `json:"content,omitempty"`
}

type FileItem added in v0.0.13

type FileItem struct {
	ID                 string `json:"id"`
	FileName           string `json:"fileName"`
	FileSource         string `json:"fileSource"`
	FilePath           string `json:"filePath"`
	RepositoryLocation string `json:"repositoryLocation"`
	RepositoryName     string `json:"repositoryName"`
	RepositoryFilePath string `json:"repositoryFilePath"`
	Ref                string `json:"ref"`
	CommitSha          string `json:"commitSha"`
	StoragePath        string `json:"storagePath"`
	WorkspaceID        string `json:"workspaceId"`
}

type GCPKey

type GCPKey struct {
	AuthProviderX509CertURL string `json:"auth_provider_x509_cert_url,omitempty"`
	AuthURI                 string `json:"auth_uri,omitempty"`
	ClientEmail             string `json:"client_email,omitempty"`
	ClientID                string `json:"client_id,omitempty"`
	ClientX509CertURL       string `json:"client_x509_cert_url,omitempty"`
	PrivateKey              string `json:"private_key,omitempty"`
	PrivateKeyID            string `json:"private_key_id,omitempty"`
	ProjectID               string `json:"project_id,omitempty"`
	TokenURI                string `json:"token_uri,omitempty"`
	Type                    string `json:"type,omitempty"`
	UniverseDomain          string `json:"universe_domain,omitempty"`
}

type GenericError

type GenericError struct {
	Message    string
	InnerError error
}

GenericError represents a custom error type for generic errors.

func NewGenericError

func NewGenericError(message string) *GenericError

NewGenericError creates a new GenericError.

func WrapGenericError

func WrapGenericError(message string, err error) *GenericError

WrapGenericError wraps an existing error into a GenericError.

func (*GenericError) Error

func (e *GenericError) Error() string

Error implements the error interface for GenericError.

func (*GenericError) Unwrap

func (e *GenericError) Unwrap() error

Unwrap returns the inner error for GenericError.

type GuardCondition

type GuardCondition struct {
	Comparator string  `json:"comparator"`
	Comparand  float64 `json:"comparand"`
}

type GuardConfiguration

type GuardConfiguration struct {
	ID                 string            `json:"id,omitempty"`
	Name               string            `json:"name"`
	Description        string            `json:"description"`
	Stages             []string          `json:"stages"`
	Type               string            `json:"type"`
	OOTBType           string            `json:"ootbType,omitempty"`
	Intervention       GuardIntervention `json:"intervention"`
	ErrorMessage       string            `json:"errorMessage,omitempty"`
	IsValid            bool              `json:"isValid,omitempty"`
	LlmType            string            `json:"llmType,omitempty"`
	DeploymentID       string            `json:"deploymentId,omitempty"`
	NemoInfo           NemoInfo          `json:"nemoInfo,omitempty"`
	ModelInfo          GuardModelInfo    `json:"modelInfo,omitempty"`
	OpenAICredential   string            `json:"openaiCredential,omitempty"`
	OpenAIApiBase      string            `json:"openaiApiBase,omitempty"`
	OpenAIDeploymentID string            `json:"openaiDeploymentId,omitempty"`
}

type GuardConfigurationResponse

type GuardConfigurationResponse struct {
	Data []GuardConfiguration `json:"data"`
}

type GuardIntervention

type GuardIntervention struct {
	Action           string           `json:"action"`
	AllowedActions   []string         `json:"allowedActions"`
	Conditions       []GuardCondition `json:"conditions"`
	ConditionLogic   string           `json:"conditionLogic,omitempty"`
	ModifyMessage    string           `json:"modifyMessage,omitempty"`
	Message          string           `json:"message,omitempty"`
	SendNotification bool             `json:"sendNotification,omitempty"`
}

type GuardModelInfo

type GuardModelInfo struct {
	InputColumnName           string   `json:"inputColumnName,omitempty"`
	OutputColumnName          string   `json:"outputColumnName,omitempty"`
	TargetType                string   `json:"targetType,omitempty"`
	ClassNames                []string `json:"classNames,omitempty"`
	ModelID                   string   `json:"modelId,omitempty"`
	ModelName                 string   `json:"modelName,omitempty"`
	ReplacementTextColumnName string   `json:"replacementTextColumnName,omitempty"`
}

type GuardTemplate

type GuardTemplate struct {
	ID            string            `json:"id"`
	Name          string            `json:"name"`
	Description   string            `json:"description"`
	Type          string            `json:"type"`
	AllowedStages []string          `json:"allowedStages"`
	Intervention  GuardIntervention `json:"intervention"`
	OOTBType      string            `json:"ootbType,omitempty"`
	LlmType       string            `json:"llmType,omitempty"`
	ErrorMessage  string            `json:"errorMessage,omitempty"`
	IsValid       bool              `json:"isValid,omitempty"`
	NemoInfo      NemoInfo          `json:"nemoInfo,omitempty"`
	ModelInfo     GuardModelInfo    `json:"modelInfo,omitempty"`
}

type LLMBlueprint added in v0.0.24

type LLMBlueprint struct {
	ID               string      `json:"id"`
	Name             string      `json:"name"`
	Description      string      `json:"description"`
	PlaygroundID     string      `json:"playgroundId"`
	VectorDatabaseID string      `json:"vectorDatabaseId"`
	LLMID            string      `json:"llmId"`
	LLMSettings      LLMSettings `json:"llmSettings"`
	PromptType       string      `json:"promptType"`
}

type LLMSettings added in v0.0.24

type LLMSettings struct {
	MaxCompletionLength int64   `json:"maxCompletionLength"`
	Temperature         float64 `json:"temperature"`
	TopP                float64 `json:"topP"`
	SystemPrompt        string  `json:"systemPrompt"`
}

type LanguageModelDefinitionAPIFormatted

type LanguageModelDefinitionAPIFormatted struct {
	ID string `json:"id"`
}

type ListApplicationSourceVersionsResponse added in v0.0.13

type ListApplicationSourceVersionsResponse struct {
	Data []ApplicationSourceVersion `json:"data"`
}

type ListExecutionEnvironmentsResponse

type ListExecutionEnvironmentsResponse struct {
	Data []ExecutionEnvironment `json:"data"`
}

type ListGuardTemplatesResponse

type ListGuardTemplatesResponse struct {
	Data []GuardTemplate `json:"data"`
}

type ListLLMsResponse

type ListLLMsResponse struct {
	Data []LanguageModelDefinitionAPIFormatted `json:"data"`
}

type ListRegisteredModelVersionsResponse

type ListRegisteredModelVersionsResponse struct {
	Data []RegisteredModelVersion
}

type ListRegisteredModelsResponse

type ListRegisteredModelsResponse struct {
	Data []RegisteredModel
}

type Model

type Model struct {
	ID         string `json:"id"`
	Type       string `json:"type"`
	TargetName string `json:"targetName"`
	TargetType string `json:"targetType"`
}

type ModelPackage added in v0.0.14

type ModelPackage struct {
	ID                string `json:"id"`
	Name              string `json:"name"`
	RegisteredModelID string `json:"registeredModelId"`
}

type NemoInfo

type NemoInfo struct {
	Actions      string `json:"actions,omitempty"`
	BlockedTerms string `json:"blockedTerms,omitempty"`
	LlmPrompts   string `json:"llmPrompts,omitempty"`
	MainConfig   string `json:"mainConfig,omitempty"`
	RailsConfig  string `json:"railsConfig,omitempty"`
}

type NotFoundError

type NotFoundError struct {
	Resource   string
	InnerError error
}

NotFoundError represents a custom error type for not found errors.

func NewNotFoundError

func NewNotFoundError(resource string) *NotFoundError

NewNotFoundError creates a new NotFoundError.

func WrapNotFoundError

func WrapNotFoundError(resource string, err error) *NotFoundError

WrapNotFoundError wraps an existing error into a NotFoundError.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface for NotFoundError.

func (*NotFoundError) Unwrap

func (e *NotFoundError) Unwrap() error

Unwrap returns the inner error for NotFoundError.

type OverallModerationConfiguration

type OverallModerationConfiguration struct {
	TimeoutAction string `json:"timeoutAction"`
	TimeoutSec    int    `json:"timeoutSec"`
}

type PlaygroundResponse

type PlaygroundResponse struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	UseCaseID   string `json:"useCaseId"`
}

type PredictionEnvironment

type PredictionEnvironment struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
	Platform    string `json:"platform"`
}

type PredictionsSettings added in v0.0.14

type PredictionsSettings struct {
	MinComputes int  `json:"minComputes"`
	MaxComputes int  `json:"maxComputes"`
	RealTime    bool `json:"realTime"`
}

type RegisteredModel added in v0.0.24

type RegisteredModel struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Description    string `json:"description"`
	LastVersionNum int    `json:"lastVersionNum"`
	IsGlobal       bool   `json:"isGlobal"`
}

type RegisteredModelVersion added in v0.0.24

type RegisteredModelVersion struct {
	ID                     string `json:"id"` // Registered model version ID
	Name                   string `json:"name"`
	BuildStatus            string `json:"buildStatus"`
	ModelID                string `json:"modelId"`
	RegisteredModelID      string `json:"registeredModelId"`
	RegisteredModelVersion int    `json:"registeredModelVersion"`
	Stage                  string `json:"stage"`
}

type RemoteRepositoryResponse

type RemoteRepositoryResponse struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Description  string `json:"description"`
	Location     string `json:"location"`
	SourceType   string `json:"sourceType"`
	CredentialID string `json:"credentialId"`
}

type RuntimeParameter added in v0.0.13

type RuntimeParameter struct {
	FieldName      string  `json:"fieldName"`
	Type           string  `json:"type,omitempty"`
	DefaultValue   any     `json:"defaultValue,omitempty"`
	CredentialType *string `json:"credentialType,omitempty"`
	AllowEmpty     bool    `json:"allowEmpty,omitempty"`
	Description    string  `json:"description,omitempty"`
	OverrideValue  any     `json:"overrideValue,omitempty"`
	CurrentValue   any     `json:"currentValue,omitempty"`
}

type RuntimeParameterValueRequest

type RuntimeParameterValueRequest struct {
	FieldName string `json:"fieldName"`
	Type      string `json:"type,omitempty"`
	Value     *any   `json:"value"`
}

type SegmentAnalysisSetting

type SegmentAnalysisSetting struct {
	BasicSetting
	CustomAttributes []string `json:"customAttributes,omitempty"`
}

type Service

type Service interface {
	// Use Case
	CreateUseCase(ctx context.Context, req *UseCaseRequest) (*CreateUseCaseResponse, error)
	GetUseCase(ctx context.Context, id string) (*UseCaseResponse, error)
	UpdateUseCase(ctx context.Context, id string, req *UseCaseRequest) (*UseCaseResponse, error)
	DeleteUseCase(ctx context.Context, id string) error

	// Remote Repository
	CreateRemoteRepository(ctx context.Context, req *CreateRemoteRepositoryRequest) (*RemoteRepositoryResponse, error)
	GetRemoteRepository(ctx context.Context, id string) (*RemoteRepositoryResponse, error)
	UpdateRemoteRepository(ctx context.Context, id string, req *UpdateRemoteRepositoryRequest) (*RemoteRepositoryResponse, error)
	DeleteRemoteRepository(ctx context.Context, id string) error

	// Data Set
	CreateDataset(ctx context.Context, req *CreateDatasetRequest) (*CreateDatasetResponse, error)
	CreateDatasetFromFile(ctx context.Context, fileName string, content []byte) (*CreateDatasetVersionResponse, error)
	CreateDatasetVersionFromFile(ctx context.Context, id string, fileName string, content []byte) (*CreateDatasetVersionResponse, error)
	GetDataset(ctx context.Context, id string) (*DatasetResponse, error)
	IsDatasetReady(ctx context.Context, id string) (bool, error)
	UpdateDataset(ctx context.Context, id string, req *UpdateDatasetRequest) (*DatasetResponse, error)
	DeleteDataset(ctx context.Context, id string) error
	LinkDatasetToUseCase(ctx context.Context, useCaseID, datasetID string) error

	// Vector Database
	CreateVectorDatabase(ctx context.Context, req *CreateVectorDatabaseRequest) (*VectorDatabase, error)
	GetVectorDatabase(ctx context.Context, id string) (*VectorDatabase, error)
	UpdateVectorDatabase(ctx context.Context, id string, req *UpdateVectorDatabaseRequest) (*VectorDatabase, error)
	DeleteVectorDatabase(ctx context.Context, id string) error
	IsVectorDatabaseReady(ctx context.Context, id string) (bool, error)

	// Playground
	CreatePlayground(ctx context.Context, req *CreatePlaygroundRequest) (*CreatePlaygroundResponse, error)
	GetPlayground(ctx context.Context, id string) (*PlaygroundResponse, error)
	UpdatePlayground(ctx context.Context, id string, req *UpdatePlaygroundRequest) (*PlaygroundResponse, error)
	DeletePlayground(ctx context.Context, id string) error

	// LLM Blueprint
	CreateLLMBlueprint(ctx context.Context, req *CreateLLMBlueprintRequest) (*LLMBlueprint, error)
	GetLLMBlueprint(ctx context.Context, id string) (*LLMBlueprint, error)
	UpdateLLMBlueprint(ctx context.Context, id string, req *UpdateLLMBlueprintRequest) (*LLMBlueprint, error)
	DeleteLLMBlueprint(ctx context.Context, id string) error
	ListLLMs(ctx context.Context) (*ListLLMsResponse, error)

	// Custom Model
	CreateCustomModel(ctx context.Context, req *CreateCustomModelRequest) (*CustomModel, error)
	CreateCustomModelFromLLMBlueprint(ctx context.Context, req *CreateCustomModelFromLLMBlueprintRequest) (*CreateCustomModelVersionFromLLMBlueprintResponse, error)
	CreateCustomModelVersionCreateFromLatest(ctxc context.Context, id string, req *CreateCustomModelVersionFromLatestRequest) (*CustomModelVersion, error)
	CreateCustomModelVersionFromFiles(ctx context.Context, id string, req *CreateCustomModelVersionFromFilesRequest) (*CustomModelVersion, error)
	CreateCustomModelVersionFromRemoteRepository(ctx context.Context, id string, req *CreateCustomModelVersionFromRemoteRepositoryRequest) (*CustomModelVersion, string, error)
	GetCustomModel(ctx context.Context, id string) (*CustomModel, error)
	IsCustomModelReady(ctx context.Context, id string) (bool, error)
	UpdateCustomModel(ctx context.Context, id string, req *UpdateCustomModelRequest) (*CustomModel, error)
	DeleteCustomModel(ctx context.Context, id string) error
	ListExecutionEnvironments(ctx context.Context) (*ListExecutionEnvironmentsResponse, error)
	ListGuardTemplates(ctx context.Context) (*ListGuardTemplatesResponse, error)
	GetGuardConfigurationsForCustomModelVersion(ctx context.Context, id string) (*GuardConfigurationResponse, error)
	GetOverallModerationConfigurationForCustomModelVersion(ctx context.Context, id string) (*OverallModerationConfiguration, error)
	CreateCustomModelVersionFromGuardConfigurations(ctx context.Context, id string, req *CreateCustomModelVersionFromGuardsConfigurationRequest) (*CreateCustomModelVersionFromGuardsConfigurationResponse, error)
	CreateDependencyBuild(ctx context.Context, id string, versionID string) (*DependencyBuild, error)
	GetDependencyBuild(ctx context.Context, id string, versionID string) (*DependencyBuild, error)

	// Registered Model
	CreateRegisteredModelFromCustomModelVersion(ctx context.Context, req *CreateRegisteredModelFromCustomModelRequest) (*RegisteredModelVersion, error)
	UpdateRegisteredModelVersion(ctx context.Context, registeredModelId string, versionId string, req *UpdateRegisteredModelVersionRequest) (*RegisteredModelVersion, error)
	ListRegisteredModelVersions(ctx context.Context, id string) (*ListRegisteredModelVersionsResponse, error)
	GetLatestRegisteredModelVersion(ctx context.Context, id string) (*RegisteredModelVersion, error)
	GetRegisteredModelVersion(ctx context.Context, registeredModelId string, versionId string) (*RegisteredModelVersion, error)
	IsRegisteredModelVersionReady(ctx context.Context, registeredModelId string, versionId string) (bool, error)
	ListRegisteredModels(ctx context.Context) (*ListRegisteredModelsResponse, error)
	GetRegisteredModel(ctx context.Context, id string) (*RegisteredModel, error)
	UpdateRegisteredModel(ctx context.Context, id string, req *UpdateRegisteredModelRequest) (*RegisteredModel, error)
	DeleteRegisteredModel(ctx context.Context, id string) error

	// Prediction Environment
	CreatePredictionEnvironment(ctx context.Context, req *CreatePredictionEnvironmentRequest) (*PredictionEnvironment, error)
	GetPredictionEnvironment(ctx context.Context, id string) (*PredictionEnvironment, error)
	UpdatePredictionEnvironment(ctx context.Context, id string, req *UpdatePredictionEnvironmentRequest) (*PredictionEnvironment, error)
	DeletePredictionEnvironment(ctx context.Context, id string) error

	// Deployment
	CreateDeploymentFromModelPackage(ctx context.Context, req *CreateDeploymentFromModelPackageRequest) (*DeploymentCreateResponse, error)
	GetDeployment(ctx context.Context, id string) (*DeploymentRetrieveResponse, error)
	UpdateDeployment(ctx context.Context, id string, req *UpdateDeploymentRequest) (*DeploymentRetrieveResponse, error)
	UpdateDeploymentSettings(ctx context.Context, id string, req *DeploymentSettings) (*DeploymentSettings, error)
	GetDeploymentSettings(ctx context.Context, id string) (*DeploymentSettings, error)
	DeleteDeployment(ctx context.Context, id string) error
	ValidateDeploymentModelReplacement(ctx context.Context, id string, req *ValidateDeployemntModelReplacementRequest) (*ValidateDeployemntModelReplacementResponse, error)
	UpdateDeploymentModel(ctx context.Context, id string, req *UpdateDeploymentModelRequest) (*DeploymentRetrieveResponse, string, error)

	// Application Source
	CreateApplicationSource(ctx context.Context) (*ApplicationSource, error)
	GetApplicationSource(ctx context.Context, id string) (*ApplicationSource, error)
	UpdateApplicationSource(ctx context.Context, id string, req *UpdateApplicationSourceRequest) (*ApplicationSource, error)
	ListApplicationSourceVersions(ctx context.Context, id string) (*ListApplicationSourceVersionsResponse, error)
	CreateApplicationSourceVersion(ctx context.Context, id string, req *CreateApplicationSourceVersionRequest) (*ApplicationSourceVersion, error)
	UpdateApplicationSourceVersion(ctx context.Context, id string, versionId string, req *UpdateApplicationSourceVersionRequest) (*ApplicationSourceVersion, error)
	UpdateApplicationSourceVersionFiles(ctx context.Context, id string, versionId string, files []FileInfo) (*ApplicationSourceVersion, error)
	GetApplicationSourceVersion(ctx context.Context, id string, versionId string) (*ApplicationSourceVersion, error)
	DeleteApplicationSource(ctx context.Context, id string) error

	// Application
	CreateApplicationFromSource(ctx context.Context, req *CreateApplicationFromSourceRequest) (*Application, error)
	CreateQAApplication(ctx context.Context, req *CreateQAApplicationRequest) (*Application, error)
	GetApplication(ctx context.Context, id string) (*Application, error)
	IsApplicationReady(ctx context.Context, id string) (bool, error)
	UpdateApplication(ctx context.Context, id string, req *UpdateApplicationRequest) (*Application, error)
	DeleteApplication(ctx context.Context, id string) error

	// Credential
	CreateCredential(ctx context.Context, req *CredentialRequest) (*CredentialResponse, error)
	GetCredential(ctx context.Context, id string) (*CredentialResponse, error)
	UpdateCredential(ctx context.Context, id string, req *CredentialRequest) (*CredentialResponse, error)
	DeleteCredential(ctx context.Context, id string) error

	// Async Tasks
	GetTaskStatus(ctx context.Context, id string) (*TaskStatusResponse, error)
}

func NewService

func NewService(c *Client) Service

NewService creates a new API service.

type ServiceImpl

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

Service for the DataRobot API.

func (*ServiceImpl) CreateApplicationFromSource added in v0.0.13

func (s *ServiceImpl) CreateApplicationFromSource(ctx context.Context, req *CreateApplicationFromSourceRequest) (*Application, error)

func (*ServiceImpl) CreateApplicationSource added in v0.0.13

func (s *ServiceImpl) CreateApplicationSource(ctx context.Context) (*ApplicationSource, error)

Application Service Implementation.

func (*ServiceImpl) CreateApplicationSourceVersion added in v0.0.13

func (s *ServiceImpl) CreateApplicationSourceVersion(ctx context.Context, id string, req *CreateApplicationSourceVersionRequest) (*ApplicationSourceVersion, error)

func (*ServiceImpl) CreateCredential

func (s *ServiceImpl) CreateCredential(ctx context.Context, req *CredentialRequest) (*CredentialResponse, error)

Credentials Service Implementation.

func (*ServiceImpl) CreateCustomModel

func (s *ServiceImpl) CreateCustomModel(ctx context.Context, req *CreateCustomModelRequest) (*CustomModel, error)

func (*ServiceImpl) CreateCustomModelVersionCreateFromLatest

func (s *ServiceImpl) CreateCustomModelVersionCreateFromLatest(ctx context.Context, id string, req *CreateCustomModelVersionFromLatestRequest) (*CustomModelVersion, error)

func (*ServiceImpl) CreateCustomModelVersionFromFiles

func (s *ServiceImpl) CreateCustomModelVersionFromFiles(ctx context.Context, id string, req *CreateCustomModelVersionFromFilesRequest) (*CustomModelVersion, error)

func (*ServiceImpl) CreateCustomModelVersionFromRemoteRepository

func (s *ServiceImpl) CreateCustomModelVersionFromRemoteRepository(ctx context.Context, id string, req *CreateCustomModelVersionFromRemoteRepositoryRequest) (*CustomModelVersion, string, error)

func (*ServiceImpl) CreateDataset

Data Set Service Implementation.

func (*ServiceImpl) CreateDatasetFromFile

func (s *ServiceImpl) CreateDatasetFromFile(ctx context.Context, fileName string, content []byte) (*CreateDatasetVersionResponse, error)

func (*ServiceImpl) CreateDatasetVersionFromFile

func (s *ServiceImpl) CreateDatasetVersionFromFile(ctx context.Context, id string, fileName string, content []byte) (*CreateDatasetVersionResponse, error)

func (*ServiceImpl) CreateDependencyBuild added in v0.1.27

func (s *ServiceImpl) CreateDependencyBuild(ctx context.Context, id string, versionID string) (*DependencyBuild, error)

func (*ServiceImpl) CreateDeploymentFromModelPackage

func (s *ServiceImpl) CreateDeploymentFromModelPackage(ctx context.Context, req *CreateDeploymentFromModelPackageRequest) (*DeploymentCreateResponse, error)

Deployment Service Implementation.

func (*ServiceImpl) CreateLLMBlueprint

func (s *ServiceImpl) CreateLLMBlueprint(ctx context.Context, req *CreateLLMBlueprintRequest) (*LLMBlueprint, error)

func (*ServiceImpl) CreatePlayground

Playground Service Implementation.

func (*ServiceImpl) CreatePredictionEnvironment

func (s *ServiceImpl) CreatePredictionEnvironment(ctx context.Context, req *CreatePredictionEnvironmentRequest) (*PredictionEnvironment, error)

Prediction Environment Service Implementation.

func (*ServiceImpl) CreateQAApplication added in v0.0.19

func (s *ServiceImpl) CreateQAApplication(ctx context.Context, req *CreateQAApplicationRequest) (*Application, error)

func (*ServiceImpl) CreateRegisteredModelFromCustomModelVersion

func (s *ServiceImpl) CreateRegisteredModelFromCustomModelVersion(ctx context.Context, req *CreateRegisteredModelFromCustomModelRequest) (*RegisteredModelVersion, error)

Registered Model Service Implementation.

func (*ServiceImpl) CreateRemoteRepository

Remote Repository Service Implementation.

func (*ServiceImpl) CreateUseCase

func (s *ServiceImpl) CreateUseCase(ctx context.Context, req *UseCaseRequest) (resp *CreateUseCaseResponse, err error)

func (*ServiceImpl) CreateVectorDatabase

func (s *ServiceImpl) CreateVectorDatabase(ctx context.Context, req *CreateVectorDatabaseRequest) (*VectorDatabase, error)

Vector Database Service Implementation.

func (*ServiceImpl) DeleteApplication added in v0.0.13

func (s *ServiceImpl) DeleteApplication(ctx context.Context, id string) error

func (*ServiceImpl) DeleteApplicationSource added in v0.0.13

func (s *ServiceImpl) DeleteApplicationSource(ctx context.Context, id string) error

func (*ServiceImpl) DeleteCredential

func (s *ServiceImpl) DeleteCredential(ctx context.Context, id string) error

func (*ServiceImpl) DeleteCustomModel

func (s *ServiceImpl) DeleteCustomModel(ctx context.Context, id string) error

func (*ServiceImpl) DeleteDataset

func (s *ServiceImpl) DeleteDataset(ctx context.Context, id string) error

func (*ServiceImpl) DeleteDeployment

func (s *ServiceImpl) DeleteDeployment(ctx context.Context, id string) error

func (*ServiceImpl) DeleteLLMBlueprint

func (s *ServiceImpl) DeleteLLMBlueprint(ctx context.Context, id string) error

func (*ServiceImpl) DeletePlayground

func (s *ServiceImpl) DeletePlayground(ctx context.Context, id string) error

func (*ServiceImpl) DeletePredictionEnvironment

func (s *ServiceImpl) DeletePredictionEnvironment(ctx context.Context, id string) error

func (*ServiceImpl) DeleteRegisteredModel

func (s *ServiceImpl) DeleteRegisteredModel(ctx context.Context, id string) error

func (*ServiceImpl) DeleteRemoteRepository

func (s *ServiceImpl) DeleteRemoteRepository(ctx context.Context, id string) error

func (*ServiceImpl) DeleteUseCase

func (s *ServiceImpl) DeleteUseCase(ctx context.Context, id string) error

func (*ServiceImpl) DeleteVectorDatabase

func (s *ServiceImpl) DeleteVectorDatabase(ctx context.Context, id string) error

func (*ServiceImpl) GetApplication added in v0.0.13

func (s *ServiceImpl) GetApplication(ctx context.Context, id string) (*Application, error)

func (*ServiceImpl) GetApplicationSource added in v0.0.13

func (s *ServiceImpl) GetApplicationSource(ctx context.Context, id string) (*ApplicationSource, error)

func (*ServiceImpl) GetApplicationSourceVersion added in v0.0.13

func (s *ServiceImpl) GetApplicationSourceVersion(ctx context.Context, id string, versionId string) (*ApplicationSourceVersion, error)

func (*ServiceImpl) GetCredential

func (s *ServiceImpl) GetCredential(ctx context.Context, id string) (*CredentialResponse, error)

func (*ServiceImpl) GetCustomModel

func (s *ServiceImpl) GetCustomModel(ctx context.Context, id string) (*CustomModel, error)

func (*ServiceImpl) GetDataset

func (s *ServiceImpl) GetDataset(ctx context.Context, id string) (*DatasetResponse, error)

func (*ServiceImpl) GetDependencyBuild added in v0.1.27

func (s *ServiceImpl) GetDependencyBuild(ctx context.Context, id string, versionID string) (*DependencyBuild, error)

func (*ServiceImpl) GetDeployment

func (s *ServiceImpl) GetDeployment(ctx context.Context, id string) (*DeploymentRetrieveResponse, error)

func (*ServiceImpl) GetDeploymentSettings

func (s *ServiceImpl) GetDeploymentSettings(ctx context.Context, id string) (*DeploymentSettings, error)

func (*ServiceImpl) GetGuardConfigurationsForCustomModelVersion

func (s *ServiceImpl) GetGuardConfigurationsForCustomModelVersion(ctx context.Context, id string) (*GuardConfigurationResponse, error)

func (*ServiceImpl) GetLLMBlueprint

func (s *ServiceImpl) GetLLMBlueprint(ctx context.Context, id string) (*LLMBlueprint, error)

func (*ServiceImpl) GetLatestRegisteredModelVersion

func (s *ServiceImpl) GetLatestRegisteredModelVersion(ctx context.Context, id string) (*RegisteredModelVersion, error)

func (*ServiceImpl) GetOverallModerationConfigurationForCustomModelVersion

func (s *ServiceImpl) GetOverallModerationConfigurationForCustomModelVersion(ctx context.Context, id string) (*OverallModerationConfiguration, error)

func (*ServiceImpl) GetPlayground

func (s *ServiceImpl) GetPlayground(ctx context.Context, id string) (*PlaygroundResponse, error)

func (*ServiceImpl) GetPredictionEnvironment

func (s *ServiceImpl) GetPredictionEnvironment(ctx context.Context, id string) (*PredictionEnvironment, error)

func (*ServiceImpl) GetRegisteredModel

func (s *ServiceImpl) GetRegisteredModel(ctx context.Context, id string) (*RegisteredModel, error)

func (*ServiceImpl) GetRegisteredModelVersion

func (s *ServiceImpl) GetRegisteredModelVersion(ctx context.Context, registeredModelId string, versionId string) (*RegisteredModelVersion, error)

func (*ServiceImpl) GetRemoteRepository

func (s *ServiceImpl) GetRemoteRepository(ctx context.Context, id string) (*RemoteRepositoryResponse, error)

func (*ServiceImpl) GetTaskStatus

func (s *ServiceImpl) GetTaskStatus(ctx context.Context, id string) (*TaskStatusResponse, error)

func (*ServiceImpl) GetUseCase

func (s *ServiceImpl) GetUseCase(ctx context.Context, id string) (*UseCaseResponse, error)

func (*ServiceImpl) GetVectorDatabase

func (s *ServiceImpl) GetVectorDatabase(ctx context.Context, id string) (*VectorDatabase, error)

func (*ServiceImpl) IsApplicationReady added in v0.0.13

func (s *ServiceImpl) IsApplicationReady(ctx context.Context, id string) (bool, error)

func (*ServiceImpl) IsCustomModelReady

func (s *ServiceImpl) IsCustomModelReady(ctx context.Context, id string) (bool, error)

func (*ServiceImpl) IsDatasetReady

func (s *ServiceImpl) IsDatasetReady(ctx context.Context, id string) (bool, error)

func (*ServiceImpl) IsRegisteredModelVersionReady

func (s *ServiceImpl) IsRegisteredModelVersionReady(ctx context.Context, registeredModelId string, versionId string) (bool, error)

func (*ServiceImpl) IsVectorDatabaseReady

func (s *ServiceImpl) IsVectorDatabaseReady(ctx context.Context, id string) (bool, error)

func (*ServiceImpl) LinkDatasetToUseCase

func (s *ServiceImpl) LinkDatasetToUseCase(ctx context.Context, useCaseID, datasetID string) error

Use Case Service Implementation.

func (*ServiceImpl) ListApplicationSourceVersions added in v0.0.13

func (s *ServiceImpl) ListApplicationSourceVersions(ctx context.Context, id string) (*ListApplicationSourceVersionsResponse, error)

func (*ServiceImpl) ListExecutionEnvironments

func (s *ServiceImpl) ListExecutionEnvironments(ctx context.Context) (*ListExecutionEnvironmentsResponse, error)

func (*ServiceImpl) ListGuardTemplates

func (s *ServiceImpl) ListGuardTemplates(ctx context.Context) (*ListGuardTemplatesResponse, error)

func (*ServiceImpl) ListLLMs

func (s *ServiceImpl) ListLLMs(ctx context.Context) (*ListLLMsResponse, error)

func (*ServiceImpl) ListRegisteredModelVersions

func (s *ServiceImpl) ListRegisteredModelVersions(ctx context.Context, id string) (*ListRegisteredModelVersionsResponse, error)

func (*ServiceImpl) ListRegisteredModels

func (s *ServiceImpl) ListRegisteredModels(ctx context.Context) (*ListRegisteredModelsResponse, error)

func (*ServiceImpl) UpdateApplication added in v0.0.13

func (s *ServiceImpl) UpdateApplication(ctx context.Context, id string, req *UpdateApplicationRequest) (*Application, error)

func (*ServiceImpl) UpdateApplicationSource added in v0.0.13

func (s *ServiceImpl) UpdateApplicationSource(ctx context.Context, id string, req *UpdateApplicationSourceRequest) (*ApplicationSource, error)

func (*ServiceImpl) UpdateApplicationSourceVersion added in v0.0.13

func (s *ServiceImpl) UpdateApplicationSourceVersion(ctx context.Context, id string, versionId string, req *UpdateApplicationSourceVersionRequest) (*ApplicationSourceVersion, error)

func (*ServiceImpl) UpdateApplicationSourceVersionFiles added in v0.0.13

func (s *ServiceImpl) UpdateApplicationSourceVersionFiles(ctx context.Context, id string, versionId string, files []FileInfo) (*ApplicationSourceVersion, error)

func (*ServiceImpl) UpdateCredential

func (s *ServiceImpl) UpdateCredential(ctx context.Context, id string, req *CredentialRequest) (*CredentialResponse, error)

func (*ServiceImpl) UpdateCustomModel

func (s *ServiceImpl) UpdateCustomModel(ctx context.Context, id string, req *UpdateCustomModelRequest) (*CustomModel, error)

func (*ServiceImpl) UpdateDataset

func (s *ServiceImpl) UpdateDataset(ctx context.Context, id string, req *UpdateDatasetRequest) (*DatasetResponse, error)

func (*ServiceImpl) UpdateDeployment

func (*ServiceImpl) UpdateDeploymentModel

func (*ServiceImpl) UpdateDeploymentSettings

func (s *ServiceImpl) UpdateDeploymentSettings(ctx context.Context, id string, req *DeploymentSettings) (*DeploymentSettings, error)

func (*ServiceImpl) UpdateLLMBlueprint

func (s *ServiceImpl) UpdateLLMBlueprint(ctx context.Context, id string, req *UpdateLLMBlueprintRequest) (*LLMBlueprint, error)

func (*ServiceImpl) UpdatePlayground

func (s *ServiceImpl) UpdatePlayground(ctx context.Context, id string, req *UpdatePlaygroundRequest) (*PlaygroundResponse, error)

func (*ServiceImpl) UpdatePredictionEnvironment

func (s *ServiceImpl) UpdatePredictionEnvironment(ctx context.Context, id string, req *UpdatePredictionEnvironmentRequest) (*PredictionEnvironment, error)

func (*ServiceImpl) UpdateRegisteredModel

func (s *ServiceImpl) UpdateRegisteredModel(ctx context.Context, id string, req *UpdateRegisteredModelRequest) (*RegisteredModel, error)

func (*ServiceImpl) UpdateRegisteredModelVersion added in v0.0.24

func (s *ServiceImpl) UpdateRegisteredModelVersion(ctx context.Context, registeredModelId string, versionId string, req *UpdateRegisteredModelVersionRequest) (*RegisteredModelVersion, error)

func (*ServiceImpl) UpdateRemoteRepository

func (s *ServiceImpl) UpdateRemoteRepository(ctx context.Context, id string, req *UpdateRemoteRepositoryRequest) (*RemoteRepositoryResponse, error)

func (*ServiceImpl) UpdateUseCase

func (s *ServiceImpl) UpdateUseCase(ctx context.Context, id string, req *UseCaseRequest) (*UseCaseResponse, error)

func (*ServiceImpl) UpdateVectorDatabase

func (s *ServiceImpl) UpdateVectorDatabase(ctx context.Context, id string, req *UpdateVectorDatabaseRequest) (*VectorDatabase, error)

type TaskStatusResponse

type TaskStatusResponse struct {
	StatusID    string `json:"statusId"`
	Status      string `json:"status"`
	Message     string `json:"message"`
	Code        int    `json:"code"`
	Description string `json:"description"`
	StatusType  string `json:"statusType"`
}

type TrainingDataAssignmentError added in v0.0.21

type TrainingDataAssignmentError struct {
	Message string `json:"message"`
}

type UnauthorizedError

type UnauthorizedError struct {
	Resource   string
	InnerError error
}

UnauthorizedError represents a custom error type for access denied errors.

func NewUnauthorizedError

func NewUnauthorizedError(resource string) *UnauthorizedError

NewUnauthorizedError creates a new UnauthorizedError.

func WrapUnauthorizedError

func WrapUnauthorizedError(resource string, err error) *UnauthorizedError

WrapUnauthorizedError wraps an existing error into an UnauthorizedError.

func (*UnauthorizedError) Error

func (e *UnauthorizedError) Error() string

Error implements the error interface for UnauthorizedError.

func (*UnauthorizedError) Unwrap

func (e *UnauthorizedError) Unwrap() error

Unwrap returns the inner error for UnauthorizedError.

type UpdateApplicationRequest added in v0.0.13

type UpdateApplicationRequest struct {
	Name                     string   `json:"name,omitempty"`
	ExternalAccessEnabled    bool     `json:"externalAccessEnabled"`
	ExternalAccessRecipients []string `json:"externalAccessRecipients"`
}

type UpdateApplicationSourceRequest added in v0.0.13

type UpdateApplicationSourceRequest struct {
	Name string `json:"name"`
}

type UpdateApplicationSourceVersionRequest added in v0.0.13

type UpdateApplicationSourceVersionRequest struct {
	BaseEnvironmentID            string               `json:"baseEnvironmentId,omitempty"`
	Resources                    ApplicationResources `json:"resources,omitempty"`
	FilesToDelete                []string             `json:"filesToDelete,omitempty"`
	RuntimeParameterValueRequest string               `json:"runtimeParameterValues,omitempty"`
}

type UpdateCustomModelRequest added in v0.0.20

type UpdateCustomModelRequest struct {
	Name                                        string   `json:"name,omitempty"`
	Description                                 string   `json:"description,omitempty"`
	TargetName                                  string   `json:"targetName,omitempty"`
	PositiveClassLabel                          string   `json:"positiveClassLabel,omitempty"`
	NegativeClassLabel                          string   `json:"negativeClassLabel,omitempty"`
	PredictionThreshold                         float64  `json:"predictionThreshold,omitempty"`
	Language                                    string   `json:"language,omitempty"`
	ClassLabels                                 []string `json:"classLabels,omitempty"`
	IsTrainingDataForVersionsPermanentlyEnabled bool     `json:"isTrainingDataForVersionsPermanentlyEnabled,omitempty"`
}

type UpdateDatasetRequest

type UpdateDatasetRequest struct {
	Name string `json:"name"`
}

type UpdateDeploymentModelRequest

type UpdateDeploymentModelRequest struct {
	ModelPackageID string `json:"modelPackageId"`
	Reason         string `json:"reason"`
}

type UpdateDeploymentRequest

type UpdateDeploymentRequest struct {
	Label string `json:"label"`
}

type UpdateLLMBlueprintRequest

type UpdateLLMBlueprintRequest struct {
	Name             string `json:"name,omitempty"`
	Description      string `json:"description,omitempty"`
	VectorDatabaseID string `json:"vectorDatabaseId,omitempty"`
	LLMID            string `json:"llmId,omitempty"`
}

type UpdatePlaygroundRequest

type UpdatePlaygroundRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UpdatePredictionEnvironmentRequest

type UpdatePredictionEnvironmentRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UpdateRegisteredModelRequest added in v0.0.24

type UpdateRegisteredModelRequest struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type UpdateRegisteredModelVersionRequest added in v0.0.24

type UpdateRegisteredModelVersionRequest struct {
	Name string `json:"name,omitempty"`
}

type UpdateRemoteRepositoryRequest

type UpdateRemoteRepositoryRequest struct {
	Name         string `json:"name,omitempty"`
	Description  string `json:"description,omitempty"`
	Location     string `json:"location,omitempty"`
	CredentialID string `json:"credentialId,omitempty"`
}

type UpdateVectorDatabaseRequest

type UpdateVectorDatabaseRequest struct {
	Name string `json:"name"`
}

type UseCaseRequest

type UseCaseRequest struct {
	Name        string `json:"name"`
	Description string `json:"description"`
}

type UseCaseResponse

type UseCaseResponse struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

type ValidateDeployemntModelReplacementRequest

type ValidateDeployemntModelReplacementRequest struct {
	ModelPackageID string `json:"modelPackageId"`
}

type ValidateDeployemntModelReplacementResponse

type ValidateDeployemntModelReplacementResponse struct {
	Status  string `json:"status"`
	Message string `json:"message"`
}

type VectorDatabase added in v0.0.14

type VectorDatabase struct {
	ID                     string   `json:"id"`
	Name                   string   `json:"name"`
	UseCaseID              string   `json:"useCaseId"`
	DatasetID              string   `json:"datasetId"`
	ExecutionStatus        string   `json:"executionStatus"`
	EmbeddingModel         string   `json:"embeddingModel"`
	ChunkSize              int64    `json:"chunkSize"`
	ChunkingMethod         string   `json:"chunkingMethod"`
	ChunkOverlapPercentage int64    `json:"chunkOverlapPercentage"`
	IsSeparatorRegex       bool     `json:"isSeparatorRegex"`
	Separators             []string `json:"separators"`
}

type VectorDatabaseSettings added in v0.0.24

type VectorDatabaseSettings struct {
	MaxDocumentsRetrievedPerPrompt int64 `json:"maxDocumentsRetrievedPerPrompt"`
	MaxTokens                      int64 `json:"maxTokens"`
}

Jump to

Keyboard shortcuts

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