Skip to content

Commit 0d82f14

Browse files
[Azure AI Language] Migrate Language.QuestionAnswering and Language.QuestionAnswering.Authoring spec (Azure#33855)
* Add Language.QuestionAnswering spec * Add question answering authoring typespec * run prettier + fix spelling * add tsv validation fixes * remove unused common.json specs + remove csharp emitter since its not used * more changes for lint and model validation * revert defining auth models * add pattern for projectName path param * ProjectMetadata.projectname change visibility to lifecycle read * address review comments #1 * address review comments #2 * revert change * more fixes * minor fixes * fix examples * remove FIXME comments * add custom patch op defintion * minor fix for custom patch operation * minor fix
1 parent 7c54f0f commit 0d82f14

File tree

60 files changed

+6370
-2525
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+6370
-2525
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import "./main.tsp";
2+
import "@azure-tools/typespec-client-generator-core";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"body": {
8+
"description": "proj1 is a test project.",
9+
"multilingualResource": true,
10+
"settings": {
11+
"defaultAnswer": "No good match found for your question in the Knowledgebase."
12+
},
13+
"language": "en"
14+
},
15+
"projectName": "proj1"
16+
},
17+
"responses": {
18+
"200": {
19+
"body": {
20+
"description": "proj1 is a test project.",
21+
"createdDateTime": "2021-05-01T15:13:22Z",
22+
"lastDeployedDateTime": "2021-05-01T15:13:22Z",
23+
"lastModifiedDateTime": "2021-05-01T15:13:22Z",
24+
"multilingualResource": true,
25+
"projectName": "proj1",
26+
"settings": {
27+
"defaultAnswer": "No good match found for your question in the Knowledgebase."
28+
},
29+
"language": "en"
30+
},
31+
"headers": {}
32+
},
33+
"201": {
34+
"body": {
35+
"description": "proj1 is a test project.",
36+
"createdDateTime": "2021-05-01T15:13:22Z",
37+
"lastDeployedDateTime": "2021-05-01T15:13:22Z",
38+
"lastModifiedDateTime": "2021-05-01T15:13:22Z",
39+
"multilingualResource": true,
40+
"projectName": "proj1",
41+
"settings": {
42+
"defaultAnswer": "No good match found for your question in the Knowledgebase."
43+
},
44+
"language": "en"
45+
},
46+
"headers": {}
47+
}
48+
},
49+
"operationId": "QuestionAnsweringProjects_CreateProject",
50+
"title": "Successful query"
51+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"projectName": "proj1"
8+
},
9+
"responses": {
10+
"202": {
11+
"description": "A successful call results with an Operation-Location header used to check the status of the analysis job.",
12+
"headers": {
13+
"Operation-Location": "https://<resource-endpoint>/language/authoring/query-knowledgebases/projects/deletion-jobs/job1?api-version=2023-05-01"
14+
}
15+
}
16+
},
17+
"operationId": "QuestionAnsweringProjects_DeleteProject",
18+
"title": "Successful query"
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"projectName": "proj1"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"description": "proj1 is a test project.",
13+
"createdDateTime": "2021-05-01T15:13:22Z",
14+
"lastDeployedDateTime": "2021-05-01T15:13:22Z",
15+
"lastModifiedDateTime": "2021-05-01T15:13:22Z",
16+
"projectName": "proj1",
17+
"settings": {
18+
"defaultAnswer": "No good match found for your question in the Knowledgebase."
19+
},
20+
"language": "en"
21+
},
22+
"headers": {}
23+
}
24+
},
25+
"operationId": "QuestionAnsweringProjects_GetProjectDetails",
26+
"title": "Successful query"
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"projectName": "proj1"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"answer": "ans1",
15+
"dialog": {
16+
"isContextOnly": false,
17+
"prompts": [
18+
{
19+
"displayOrder": 1,
20+
"displayText": "prompt 1.1",
21+
"qnaId": 11
22+
},
23+
{
24+
"displayOrder": 2,
25+
"displayText": "prompt 1.2",
26+
"qnaId": 21
27+
}
28+
]
29+
},
30+
"id": 1,
31+
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
32+
"metadata": {
33+
"k1": "v1",
34+
"k2": "v2"
35+
},
36+
"questions": [
37+
"question 1.1",
38+
"question 1.2"
39+
],
40+
"source": "source1"
41+
},
42+
{
43+
"answer": "ans2",
44+
"id": 2,
45+
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
46+
"questions": [
47+
"question 2.1",
48+
"question 2.2"
49+
],
50+
"source": "source2"
51+
}
52+
]
53+
},
54+
"headers": {}
55+
}
56+
},
57+
"operationId": "QuestionAnsweringProjects_GetQnas",
58+
"title": "Successful query"
59+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"projectName": "proj1"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"displayName": "source1",
15+
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
16+
"source": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview",
17+
"sourceKind": "url",
18+
"sourceUri": "https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/overview/overview"
19+
},
20+
{
21+
"contentStructureKind": "unstructured",
22+
"displayName": "source2",
23+
"lastUpdatedDateTime": "2021-05-01T15:13:22Z",
24+
"source": "surface-guide.pdf",
25+
"sourceKind": "file",
26+
"sourceUri": "https://download.microsoft.com/download/2/9/B/29B20383-302C-4517-A006-B0186F04BE28/surface-pro-4-user-guide-EN.pdf"
27+
}
28+
]
29+
},
30+
"headers": {}
31+
}
32+
},
33+
"operationId": "QuestionAnsweringProjects_GetSources",
34+
"title": "Successful query"
35+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"projectName": "proj1"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"value": [
13+
{
14+
"alterations": [
15+
"qnamaker",
16+
"qna maker"
17+
]
18+
},
19+
{
20+
"alterations": [
21+
"botframework",
22+
"bot framework"
23+
]
24+
}
25+
]
26+
},
27+
"headers": {}
28+
}
29+
},
30+
"operationId": "QuestionAnsweringProjects_GetSynonyms",
31+
"title": "Successful query"
32+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"jobId": "job1"
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"createdDateTime": "2021-05-01T17:21:14Z",
13+
"errors": [],
14+
"expirationDateTime": "2021-05-01T17:21:14Z",
15+
"jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
16+
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
17+
"status": "succeeded"
18+
},
19+
"headers": {}
20+
}
21+
},
22+
"operationId": "QuestionAnsweringProjects_GetDeleteStatus",
23+
"title": "Successful query"
24+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"deploymentName": "production",
8+
"jobId": "job1",
9+
"projectName": "proj1"
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"createdDateTime": "2021-05-01T17:21:14Z",
15+
"errors": [],
16+
"expirationDateTime": "2021-05-01T17:21:14Z",
17+
"jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
18+
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
19+
"status": "succeeded"
20+
},
21+
"headers": {}
22+
}
23+
},
24+
"operationId": "QuestionAnsweringProjects_GetDeployStatus",
25+
"title": "Successful query"
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"parameters": {
3+
"Content-Type": "application/json",
4+
"Endpoint": "{Endpoint}",
5+
"Ocp-Apim-Subscription-Key": "{API key}",
6+
"api-version": "2023-04-01",
7+
"jobId": "job1",
8+
"projectName": "proj1"
9+
},
10+
"responses": {
11+
"200": {
12+
"body": {
13+
"createdDateTime": "2021-05-01T17:21:14Z",
14+
"errors": [],
15+
"expirationDateTime": "2021-05-01T17:21:14Z",
16+
"jobId": "635c2741-15c4-4c2c-9f78-bfd30b6b2a4a",
17+
"lastUpdatedDateTime": "2021-05-01T17:21:14Z",
18+
"resultUrl": "https://<resource-endpoint>/language/authoring/query-knowledgebases/projects/proj1/export/jobs/job1/result?api-version=2023-04-01",
19+
"status": "succeeded"
20+
},
21+
"headers": {}
22+
}
23+
},
24+
"operationId": "QuestionAnsweringProjects_GetExportStatus",
25+
"title": "Successful query"
26+
}

0 commit comments

Comments
 (0)