provider

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrSubscriptionRequired = "SubscriptionRequiredException"
)

Variables

View Source
var ResourceTypes = map[string]model.ResourceType{

	"CohereAI/Connectors": {
		IntegrationType: configs.IntegrationName,
		ResourceName:    "CohereAI/Connectors",
		Tags:            map[string][]string{},
		Labels:          map[string]string{},
		Annotations:     map[string]string{},
		ListDescriber:   DescribeListByCohereAI(describer.ListConnectors),
		GetDescriber:    DescribeSingleByCohereAI(describer.GetConnector),
	},

	"CohereAI/Models": {
		IntegrationType: configs.IntegrationName,
		ResourceName:    "CohereAI/Models",
		Tags:            map[string][]string{},
		Labels:          map[string]string{},
		Annotations:     map[string]string{},
		ListDescriber:   DescribeListByCohereAI(describer.ListModels),
		GetDescriber:    DescribeSingleByCohereAI(describer.GetModel),
	},

	"CohereAI/Datasets": {
		IntegrationType: configs.IntegrationName,
		ResourceName:    "CohereAI/Datasets",
		Tags:            map[string][]string{},
		Labels:          map[string]string{},
		Annotations:     map[string]string{},
		ListDescriber:   DescribeListByCohereAI(describer.ListDatasets),
		GetDescriber:    DescribeSingleByCohereAI(describer.GetDataset),
	},

	"CohereAI/FineTunedModel": {
		IntegrationType: configs.IntegrationName,
		ResourceName:    "CohereAI/FineTunedModel",
		Tags:            map[string][]string{},
		Labels:          map[string]string{},
		Annotations:     map[string]string{},
		ListDescriber:   DescribeListByCohereAI(describer.ListFineTunedModels),
		GetDescriber:    DescribeSingleByCohereAI(describer.GetFineTunedModel),
	},

	"CohereAI/EmbedJob": {
		IntegrationType: configs.IntegrationName,
		ResourceName:    "CohereAI/EmbedJob",
		Tags:            map[string][]string{},
		Labels:          map[string]string{},
		Annotations:     map[string]string{},
		ListDescriber:   DescribeListByCohereAI(describer.ListEmbedJobs),
		GetDescriber:    DescribeSingleByCohereAI(describer.GetEmbedJob),
	},
}

Functions

func AccountCredentialsFromMap

func AccountCredentialsFromMap(m map[string]any) (configs.IntegrationCredentials, error)

AccountCredentialsFromMap TODO: converts a map to an configs.IntegrationCredentials.

func AdjustResource

func AdjustResource(job describe.DescribeJob, resource *model.Resource) error

AdjustResource TODO: Do any needed adjustment on resource object before storing

func DescribeListByCohereAI

DescribeListByCohereAI A wrapper to pass cohereAI authorization to describer functions

func DescribeSingleByCohereAI

func DescribeSingleByCohereAI(describe func(context.Context, *describer.CohereAIAPIHandler, string) (*model.Resource, error)) model.SingleResourceDescriber

DescribeSingleByCohereAI A wrapper to pass cohereAI authorization to describer functions

func GetAdditionalParameters

func GetAdditionalParameters(job describe.DescribeJob) (map[string]string, error)

GetAdditionalParameters TODO: pass additional parameters needed in describer wrappers in /provider/describer_wrapper.go

func GetResourceMetadata

func GetResourceMetadata(job describe.DescribeJob, resource model.Resource) (map[string]string, error)

GetResourceMetadata TODO: Get metadata as a map to add to the resources

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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