Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions specification/ai/Azure.AI.Projects/common/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ model PendingUploadResponse {
@doc("ID for this upload request.")
pendingUploadId: string;

@doc("Version of dataset to be created if user did not specify version when initially creating upload")
dataset_version?: string;

@doc("TemporaryBlobReference is the only supported type")
pendingUploadType: PendingUploadType.temporaryBlobReference;
}
Expand Down
24 changes: 22 additions & 2 deletions specification/ai/Azure.AI.Projects/datasets/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,39 @@ union DatasetType {

#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are missing the update of DatasetType Union to support uri_folder

@doc("DatasetVersion Definition")
@discriminator("type")
model DatasetVersion {
@doc("[Required] Uri of the data. Example: https://go.microsoft.com/fwlink/?linkid=2202330")
@visibility("read", "create")
@minLength(1)
@pattern("[a-zA-Z0-9_]")
datasetUri: string;

@doc("Data type")
datasetType: DatasetType;
@doc("Dataset type")
type: DatasetType;

@doc("Indicates if dataset is reference only or managed by dataset service. If true, the underlying data will be deleted when the dataset version is deleted")
@visibility("read")
isReference?: boolean;

...AssetBase;
}

@doc("FileDatasetVersion Definition")
model FileDatasetVersion extends DatasetVersion {
@doc("Dataset type")
type: DatasetType.uri_file;

@doc("Indicates OpenAI Purpose. FileDatasets created with this field will be compatible with OpenAI-specific features")
openAIPurpose: string;
}

@doc("FileDatasetVersion Definition")
model FolderDatasetVersion extends DatasetVersion {
@doc("Dataset type")
type: DatasetType.uri_folder;
}

@doc("PagedDataVersionBase Definition")
@pagedResult
model PagedDatasetVersion {
Expand Down