Documentation
¶
Overview ¶
Implement types for each resource
Index ¶
- func AccountCredentialsFromMap(m map[string]any) (model.IntegrationCredentials, error)
- func AdjustResource(job describe.DescribeJob, resource *model.Resource) error
- func DescribeListByCohereAI(...) model.ResourceDescriber
- func DescribeSingleByCohereAI(...) model.SingleResourceDescriber
- func GetAdditionalParameters(job describe.DescribeJob) (map[string]string, error)
- func GetResourceMetadata(job describe.DescribeJob, resource model.Resource) (map[string]string, error)
- func WithTriggerType(ctx context.Context, tt enums.DescribeTriggerType) context.Context
- type BaseModel
- type CohereAIAPIHandler
- type Connector
- type ConnectorDescription
- type ConnectorDetailResponse
- type DatasetDescription
- type DatasetListResponse
- type DatasetPart
- type EmbedJobDescription
- type FineTunedModelDescription
- type Hyperparameters
- type ListEmbedJobsResponse
- type ListFineTunedModelsResponse
- type Metadata
- type ModelDescription
- type ModelListResponse
- type Oauth
- type OrganizationUsage
- type Settings
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountCredentialsFromMap ¶
func AccountCredentialsFromMap(m map[string]any) (model.IntegrationCredentials, error)
AccountCredentialsFromMap TODO: converts a map to a 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 ¶
func DescribeListByCohereAI(describe func(context.Context, *CohereAIAPIHandler, *model.StreamSender) ([]model.Resource, error)) model.ResourceDescriber
DescribeListByCohereAI A wrapper to pass cohereAI authorization to describer functions
func DescribeSingleByCohereAI ¶
func DescribeSingleByCohereAI(describe func(context.Context, *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
func WithTriggerType ¶
Types ¶
type CohereAIAPIHandler ¶
type CohereAIAPIHandler struct { Client *http.Client APIKey string RateLimiter *rate.Limiter Semaphore chan struct{} MaxRetries int RetryBackoff time.Duration ClientName string }
func NewCohereAIAPIHandler ¶
type Connector ¶
type Connector struct { ID string `json:"id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` OrganizationID string `json:"organization_id"` Description string `json:"description"` URL string `json:"url"` Excludes []string `json:"excludes"` AuthType string `json:"auth_type"` Oauth Oauth `json:"oauth"` AuthStatus string `json:"auth_status"` Active bool `json:"active"` ContinueOnFailure bool `json:"continue_on_failure"` }
type ConnectorDescription ¶
type ConnectorDetailResponse ¶
type ConnectorDetailResponse struct {
Connector Connector `json:"connector"`
}
type DatasetDescription ¶
type DatasetDescription struct { ID string `json:"id"` Name string `json:"name"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DatasetType string `json:"dataset_type"` ValidationStatus string `json:"validation_status"` ValidationError string `json:"validation_error"` Schema string `json:"schema"` RequiredFields []string `json:"required_fields"` PreserveFields []string `json:"preserve_fields"` DatasetParts []DatasetPart `json:"dataset_parts"` ValidationWarnings []string `json:"validation_warnings"` TotalUsage float64 `json:"total_usage"` }
type DatasetListResponse ¶
type DatasetListResponse struct {
Datasets []DatasetDescription `json:"datasets"`
}
type DatasetPart ¶
type EmbedJobDescription ¶
type EmbedJobDescription struct { JobID string `json:"job_id"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` InputDatasetID string `json:"input_dataset_id"` Model string `json:"model"` Truncate string `json:"truncate"` Name string `json:"name"` OutputDatasetID string `json:"output_dataset_id"` }
type FineTunedModelDescription ¶
type FineTunedModelDescription struct { Name string `json:"name"` Settings Settings `json:"settings"` ID string `json:"id"` CreatorID string `json:"creator_id"` OrganizationID string `json:"organization_id"` Status string `json:"status"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` CompletedAt time.Time `json:"completed_at"` LastUsed time.Time `json:"last_used"` }
type Hyperparameters ¶
type ListEmbedJobsResponse ¶
type ListEmbedJobsResponse struct {
EmbedJobs []EmbedJobDescription `json:"embed_jobs"`
}
type ListFineTunedModelsResponse ¶
type ListFineTunedModelsResponse struct { FinetunedModels []FineTunedModelDescription `json:"finetuned_models"` NextPageToken string `json:"next_page_token"` TotalSize int64 `json:"total_size"` }
type ModelDescription ¶
type ModelListResponse ¶
type ModelListResponse struct { Models []ModelDescription `json:"models"` NextPageToken string `json:"next_page_token"` }
type OrganizationUsage ¶
type OrganizationUsage struct {
OrganizationUsage int64 `json:"organization_usage"`
}
type Settings ¶
type Settings struct { BaseModel BaseModel `json:"base_model"` DatasetID string `json:"dataset_id"` Hyperparameters *Hyperparameters `json:"hyperparameters,omitempty"` }
Click to show internal directories.
Click to hide internal directories.