Documentation
¶
Index ¶
- Constants
- Variables
- func NewAITaskBuilderCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchCreateCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchExportCommand(c client.API, w io.Writer) *cobra.Command
- func NewBatchInstructionsCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchSetupCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchSyncCommand(c client.API, w io.Writer) *cobra.Command
- func NewBatchTasksCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchUpdateCommand(client client.API, w io.Writer) *cobra.Command
- func NewBatchesCommand(client client.API, w io.Writer) *cobra.Command
- func NewCreateDatasetCommand(client client.API, w io.Writer) *cobra.Command
- func NewDatasetUploadCommand(client client.API, w io.Writer) *cobra.Command
- func NewDatasetsCommand(client client.API, w io.Writer) *cobra.Command
- func NewGetBatchCommand(client client.API, w io.Writer) *cobra.Command
- func NewGetBatchStatusCommand(client client.API, w io.Writer) *cobra.Command
- func NewGetBatchesListCommand(client client.API, w io.Writer) *cobra.Command
- func NewGetDatasetStatusCommand(client client.API, w io.Writer) *cobra.Command
- func NewGetResponsesCommand(client client.API, w io.Writer) *cobra.Command
- type BatchCreateOptions
- type BatchExportOptions
- type BatchGetBatchesOptions
- type BatchGetOptions
- type BatchGetResponsesOptions
- type BatchGetStatusOptions
- type BatchInstructionsOptions
- type BatchSetupOptions
- type BatchSyncOptions
- type BatchTasksOptions
- type BatchUpdateOptions
- type CreateDatasetOptions
- type DatasetGetStatusOptions
- type DatasetUploadOptions
Constants ¶
const ( // Error messages ErrAtLeastOneInstructionRequired = "at least one instruction must be provided" ErrBatchIDRequired = "batch ID is required" ErrBatchNotFound = "batch not found" ErrBothInstructionInputsProvided = "cannot specify both instructions file (-f) and JSON string (-j)" ErrBothBatchItemsInputsProvided = "cannot specify both batch-items file (-f) and batch-items JSON (-j)" ErrBatchItemsMutuallyExclusive = "cannot combine --clear-batch-items with batch-items file (-f) or batch-items JSON (-j)" ErrBatchItemsMustBeArray = "batch_items must be a JSON array" ErrBatchItemsMustBeNonEmpty = "batch_items must contain at least one page" ErrDatasetIDRequired = "dataset ID is required" ErrDatasetUploadFileEmpty = "file must not be empty" ErrDatasetUploadFormatRequired = "file format could not be determined from file extension; use --format csv or --format jsonl" ErrDatasetNotFound = "dataset not found" ErrFilePathRequired = "file path is required" ErrInstructionInputRequired = "either instructions file (-f) or JSON string (-j) must be provided" ErrNameRequired = "name is required" ErrSchemaInvalidJSON = "schema contains invalid JSON" ErrSchemaStrictSetInBoth = "cannot set strict in both --schema and --strict" ErrStrictRequiresSchema = "--strict requires --schema" ErrSchemaMustBeObject = "schema must be a JSON object" ErrSchemaFieldsRequired = "schema must define at least one field" ErrSchemaMultipleTaskGroupID = "schema may define at most one task_group_id field" ErrTaskIntroductionRequired = "task introduction is required" ErrTaskNameRequired = "task name is required" ErrTaskStepsRequired = "task steps is required" ErrTasksPerGroupMinimum = "tasks per group must be at least 1" ErrWorkspaceIDRequired = "workspace ID is required" ErrAtLeastOneUpdateFieldRequired = "at least one of --name, --dataset-id, task detail flags, batch-items flags, --auto-sync, or --no-auto-sync must be provided" ErrAutoSyncFlagsMutuallyExclusive = "cannot use --auto-sync and --no-auto-sync together" )
Variables ¶
var DatasetUploadPollSleep func(time.Duration) = time.Sleep
DatasetUploadPollSleep is the sleep function used between dataset import status polls.
Functions ¶
func NewAITaskBuilderCommand ¶
NewAITaskBuilderCommand creates a new `aitaskbuilder` command
func NewBatchCreateCommand ¶ added in v0.0.57
func NewBatchExportCommand ¶ added in v1.0.0
NewBatchExportCommand creates a new `aitaskbuilder batch export` command to export a batch's responses as a ZIP archive.
func NewBatchInstructionsCommand ¶ added in v0.0.57
NewBatchInstructionsCommand creates a new command for creating AI Task Builder instructions.
func NewBatchSetupCommand ¶ added in v0.0.57
func NewBatchSyncCommand ¶ added in v1.0.3
NewBatchSyncCommand creates a new `aitaskbuilder batch sync` command to extend a batch with tasks for datapoints appended to its dataset since the last sync.
func NewBatchTasksCommand ¶ added in v0.0.57
func NewBatchUpdateCommand ¶ added in v1.0.0
func NewBatchesCommand ¶ added in v0.0.57
NewBatchesCommand creates a new `batch` command
func NewCreateDatasetCommand ¶ added in v0.0.57
NewCreateDatasetCommand creates a new command for creating datasets
func NewDatasetUploadCommand ¶ added in v0.0.57
NewDatasetUploadCommand creates a new command for uploading to an AI Task Builder dataset.
func NewDatasetsCommand ¶ added in v0.0.57
NewDatasetsCommand creates a new `dataset` command
func NewGetBatchesListCommand ¶ added in v0.0.57
Types ¶
type BatchCreateOptions ¶ added in v0.0.57
type BatchExportOptions ¶ added in v1.0.0
BatchExportOptions holds the options for the batch export command.
type BatchGetBatchesOptions ¶
type BatchGetOptions ¶
type BatchGetStatusOptions ¶
type BatchInstructionsOptions ¶ added in v0.0.57
type BatchInstructionsOptions struct {
Args []string
BatchID string
InstructionsFile string
InstructionsJSON string
}
BatchInstructionsOptions are the options for creating AI Task Builder instructions.
type BatchSetupOptions ¶ added in v0.0.57
type BatchSyncOptions ¶ added in v1.0.3
BatchSyncOptions holds the options for the batch sync command.
type BatchTasksOptions ¶ added in v0.0.57
type BatchUpdateOptions ¶ added in v1.0.0
type BatchUpdateOptions struct {
Args []string
BatchID string
Name string
DatasetID string
TaskName string
TaskIntroduction string
TaskSteps string
TaskNameChanged bool
TaskIntroductionChanged bool
TaskStepsChanged bool
BatchItemsFile string
BatchItemsJSON string
ClearBatchItems bool
EnableAutoSync bool
DisableAutoSync bool
}
type CreateDatasetOptions ¶ added in v0.0.57
type CreateDatasetOptions struct {
Args []string
Name string
WorkspaceID string
Schema string // raw --schema value (inline JSON or path)
Strict bool // --strict flag value
StrictSet bool // whether --strict was explicitly passed
}
CreateDatasetOptions holds the options for creating a dataset
type DatasetGetStatusOptions ¶
Source Files
¶
- aitaskbuilder.go
- batch_create.go
- batch_export.go
- batch_instructions.go
- batch_items.go
- batch_setup.go
- batch_sync.go
- batch_tasks.go
- batch_update.go
- batches.go
- constants.go
- create_dataset.go
- dataset_schema.go
- datasets.go
- get_batch.go
- get_batch_status.go
- get_batches.go
- get_dataset_status.go
- get_task_responses.go
- upload_dataset.go