Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amber/Adding ExportedModelController APIs to 20241115 Preview Conversations and Including Test JSON #3

Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"operationId": "ConversationalAnalysisAuthoring_CreateOrUpdateExportedModel",
"title": "Successful Create Exported Model",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-11-15-preview",
"projectName": "LoanAgreements",
"exportedModelName": "exported-model1",
"body": {
"trainedModelLabel": "model1"
}
},
"responses": {
"202": {
"headers": {
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/LoanAgreements/exported-models/exported-model1/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2023-04-15-preview"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"operationId": "ConversationalAnalysisAuthoring_DeleteExportedModel",
"title": "Successful Delete Exported Model",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-11-15-preview",
"projectName": "LoanAgreements",
"exportedModelName": "exported-model1"
},
"responses": {
"202": {
"headers": {
"operation-location": "{Endpoint}/language/authoring/analyze-conversations/projects/LoanAgreements/exported-models/exported-model1/jobs/4d37982f-fded-4c2c-afe3-15953b5919b6_637858368000000000?api-version=2023-04-15-preview"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"operationId": "ConversationalAnalysisAuthoring_GetExportedModel",
"title": "Successful Get Exported Model",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-11-15-preview",
"projectName": "LoanAgreements",
"exportedModelName": "exported-model1"
},
"responses": {
"200": {
"headers": {},
"body": {
"exportedModelName": "exported-model1",
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
"lastTrainedDateTime": "2023-04-18T15:47:49Z",
"lastExportedModelDateTime": "2023-04-18T16:03:51Z",
"modelExpirationDate": "2023-10-28",
"modelTrainingConfigVersion": "2022-05-01"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"operationId": "ConversationalAnalysisAuthoring_GetExportedModelJobStatus",
"title": "Successful Get Exported Model Status",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-11-15-preview",
"projectName": "LoanAgreements",
"exportedModelName": "exported-model1",
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000"
},
"responses": {
"200": {
"headers": {},
"body": {
"jobId": "8ccf2ffe-e758-4d04-a44a-31512918c7e8_637858368000000000",
"createdDateTime": "2023-04-18T15:44:44Z",
"lastUpdatedDateTime": "2023-04-18T15:45:48Z",
"expirationDateTime": "2023-04-25T15:44:44Z",
"status": "running"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"operationId": "ConversationalAnalysisAuthoring_ListExportedModels",
"title": "Successful List Exported Models",
"parameters": {
"Endpoint": "{Endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"api-version": "2024-11-15-preview",
"projectName": "LoanAgreements"
},
"responses": {
"200": {
"headers": {},
"body": {
"value": [
{
"exportedModelName": "exported-model1",
"modelId": "model1-20220418T034749-299f45b8114849538c1a750b21b05a94",
"lastTrainedDateTime": "2023-04-18T15:47:49Z",
"lastExportedModelDateTime": "2023-04-18T16:03:51Z",
"modelExpirationDate": "2023-10-28",
"modelTrainingConfigVersion": "2022-05-01"
},
{
"exportedModelName": "exported-model2",
"modelId": "model2-20220418T052522-c63bd244dd9e4bf8adec1a7129968c99",
"lastTrainedDateTime": "2023-04-18T17:25:22Z",
"lastExportedModelDateTime": "2023-04-18T16:03:51Z",
"modelExpirationDate": "2023-10-28",
"modelTrainingConfigVersion": "2022-05-01"
}
],
"nextLink": null
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2059,3 +2059,77 @@ model ConversationalAnalysisAuthoringOrchestrationExportedUtterance {
*/
dataset?: string;
}


/**
* Represents an exported trained model.
*/
@clientName("ExportedTrainedModel", "csharp")
@resource("exported-models")
@parentResource(ConversationalAnalysisAuthoringProjectMetadata)
model ConversationalAnalysisAuthoringExportedTrainedModel {
/**
* The exported model name.
*/
@key("exportedModelName")
@visibility
exportedModelName: string;
/**
* The model ID.
*/
modelId: string;
/**
* The last trained date time of the model.
*/
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
lastTrainedDateTime: utcDateTime;
/**
* The last exported date time of the model.
*/
// FIXME: (utcDateTime) Please double check that this is the correct type for your scenario.
lastExportedModelDateTime: utcDateTime;
/**
* The model expiration date.
*/
modelExpirationDate: plainDate;
/**
* The model training config version.
*/
modelTrainingConfigVersion: string;
}
/**
* Represents the state of a job to create or updated an exported model.
*/
@added(Versions.v2024_11_15_preview)
@clientName("ExportedModelJobState", "csharp")
@resource("jobs")
@parentResource(ConversationalAnalysisAuthoringExportedTrainedModel)
model ConversationalAnalysisAuthoringExportedModelJobState {
...ConversationalAnalysisAuthoringJobState;
}
/**
* Represents the properties for the model file.
*/
@clientName("ModelFile", "csharp")
@added(Versions.v2024_11_15_preview)
model ConversationalAnalysisAuthoringModelFile {
/**
* The name of the file.
*/
name: string;
/**
* The URI to retrieve the content of the file.
*/
contentUri: url;
}
/**
* Represents the options for creating or replacing an exported model.
*/
@clientName("ExportedModelOptions")
@added(Versions.v2024_11_15_preview)
model ConversationalAnalysisAuthoringExportedModelOptions {
/**
* The trained model label.
*/
trainedModelLabel: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -849,4 +849,79 @@ interface ConversationalAnalysisAuthoring {
{},
ErrorResponse
>;

/**
* Gets the details of an exported model.
*/
@added(Versions.v2024_11_15_preview)
getExportedModel is languageOperations.ResourceRead<ConversationalAnalysisAuthoringExportedTrainedModel>;
/**
* Lists the exported models belonging to a project.
*/
@added(Versions.v2024_11_15_preview)
listExportedModels is languageOperations.ResourceList<
ConversationalAnalysisAuthoringExportedTrainedModel,
ListQueryParametersTrait<StandardListQueryParameters>
>;
/**
* Deletes an existing exported model.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@route("/authoring/analyze-conversations/projects/{projectName}/exported-models/{exportedModelName}")
@delete
@pollingOperation(ConversationalAnalysisAuthoring.getExportedModelJobStatus)
@added(Versions.v2024_11_15_preview)
deleteExportedModel is Foundations.LongRunningOperation<
{
/**
* The name of the project to use.
*/
@path
projectName: string;
/**
* The exported model name.
*/
@path
exportedModelName: string;
},
AcceptedResponse,
{},
ErrorResponse
>;
/**
* Creates a new exported model or replaces an existing one.
*/
#suppress "@azure-tools/typespec-azure-core/use-standard-operations"
@route("/authoring/analyze-conversations/projects/{projectName}/exported-models/{exportedModelName}")
@put
@pollingOperation(ConversationalAnalysisAuthoring.getExportedModelJobStatus)
@added(Versions.v2024_11_15_preview)
createOrUpdateExportedModel is Foundations.LongRunningOperation<
{
/**
* The name of the project to use.
*/
@path
projectName: string;
/**
* The exported model name.
*/
@path
exportedModelName: string;
/**
* The exported model info.
*/
@body
body: ConversationalAnalysisAuthoringExportedModelOptions;
},
AcceptedResponse,
{},
ErrorResponse
>;
/**
* Gets the status for an existing job to create or update an exported model.
*/
@added(Versions.v2024_11_15_preview)
getExportedModelJobStatus is languageOperations.ResourceRead<ConversationalAnalysisAuthoringExportedModelJobState>;

}
Loading