Skip to content

Commit 4157867

Browse files
committed
moving json
1 parent 1071731 commit 4157867

File tree

1 file changed

+70
-44
lines changed
  • articles/cognitive-services/language-service/summarization/includes/quickstarts

1 file changed

+70
-44
lines changed

articles/cognitive-services/language-service/summarization/includes/quickstarts/rest-api.md

Lines changed: 70 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -183,47 +183,73 @@ curl -i -X POST https://your-language-endpoint-here/language/analyze-conversatio
183183
-d \
184184
'
185185
{
186-
"jobId": "738120e1-7987-4d19-af0c-89d277762a2f",
187-
"lastUpdatedDateTime": "2022-05-31T16:52:59Z",
188-
"createdDateTime": "2022-05-31T16:52:51Z",
189-
"expirationDateTime": "2022-06-01T16:52:51Z",
190-
"status": "succeeded",
191-
"errors": [],
192186
"displayName": "Analyze conversations from 123",
193-
"tasks": {
194-
"completed": 1,
195-
"failed": 0,
196-
"inProgress": 0,
197-
"total": 1,
198-
"items": [
187+
"analysisInput": {
188+
"conversations": [
199189
{
200-
"kind": "conversationalSummarizationResults",
201-
"taskName": "analyze 1",
202-
"lastUpdateDateTime": "2022-05-31T16:52:59.85913Z",
203-
"status": "succeeded",
204-
"results": {
205-
"conversations": [
206-
{
207-
"id": "conversation1",
208-
"summaries": [
209-
{
210-
"aspect": "issue",
211-
"text": "Customer tried to set up wifi connection for Smart Brew 300 machine, but it didnt work"
212-
},
213-
{
214-
"aspect": "resolution",
215-
"text": "Asked customer to try the following steps | Asked customer for the power light | Checked if the app is prompting to connect to the machine | Transferred the call to a tech support"
216-
}
217-
],
218-
"warnings": []
219-
}
220-
],
221-
"errors": [],
222-
"modelVersion": "2022-05-15-preview"
223-
}
190+
"modality": "text",
191+
"id": "conversation1",
192+
"language": "en",
193+
"conversationItems": [
194+
{
195+
"text": "Hello, you’re chatting with Rene. How may I help you?",
196+
"id": "1",
197+
"role": "Agent",
198+
"participantId": "Agent_1"
199+
},
200+
{
201+
"text": "Hi, I tried to set up wifi connection for Smart Brew 300 espresso machine, but it didn’t work.",
202+
"id": "2",
203+
"role": "Customer",
204+
"participantId": "Customer_1"
205+
},
206+
{
207+
"text": "I’m sorry to hear that. Let’s see what we can do to fix this issue. Could you please try the following steps for me? First, could you push the wifi connection button, hold for 3 seconds, then let me know if the power light is slowly blinking on and off every second?",
208+
"id": "3",
209+
"role": "Agent",
210+
"participantId": "Agent_1"
211+
},
212+
{
213+
"text": "Yes, I pushed the wifi connection button, and now the power light is slowly blinking.",
214+
"id": "4",
215+
"role": "Customer",
216+
"participantId": "Customer_1"
217+
},
218+
{
219+
"text": "Great. Thank you! Now, please check in your Contoso Coffee app. Does it prompt to ask you to connect with the machine?",
220+
"id": "5",
221+
"role": "Agent",
222+
"participantId": "Agent_1"
223+
},
224+
{
225+
"text": "No. Nothing happened.",
226+
"id": "6",
227+
"role": "Customer",
228+
"participantId": "Customer_1"
229+
},
230+
{
231+
"text": "I’m very sorry to hear that. Let me see if there’s another way to fix the issue. Please hold on for a minute.",
232+
"id": "7",
233+
"role": "Agent",
234+
"participantId": "Agent_1"
235+
}
236+
]
224237
}
225238
]
226-
}
239+
},
240+
"tasks": [
241+
{
242+
"taskName": "analyze 1",
243+
"kind": "ConversationalSummarizationTask",
244+
"parameters": {
245+
"modelVersion": "2022-05-15-preview",
246+
"summaryAspects": [
247+
"Issue",
248+
"Resolution"
249+
]
250+
}
251+
}
252+
]
227253
}
228254
'
229255
```
@@ -247,10 +273,10 @@ curl -X GET https://your-language-endpoint-here/language/analyze-conversation
247273

248274
```json
249275
{
250-
"jobId": "28261846-59bc-435a-a73a-f47c2feb245e",
251-
"lastUpdatedDateTime": "2022-05-11T23:16:48Z",
252-
"createdDateTime": "2022-05-11T23:16:44Z",
253-
"expirationDateTime": "2022-05-12T23:16:44Z",
276+
"jobId": "738120e1-7987-4d19-af0c-89d277762a2f",
277+
"lastUpdatedDateTime": "2022-05-31T16:52:59Z",
278+
"createdDateTime": "2022-05-31T16:52:51Z",
279+
"expirationDateTime": "2022-06-01T16:52:51Z",
254280
"status": "succeeded",
255281
"errors": [],
256282
"displayName": "Analyze conversations from 123",
@@ -263,7 +289,7 @@ curl -X GET https://your-language-endpoint-here/language/analyze-conversation
263289
{
264290
"kind": "conversationalSummarizationResults",
265291
"taskName": "analyze 1",
266-
"lastUpdateDateTime": "2022-05-11T23:16:48.9553011Z",
292+
"lastUpdateDateTime": "2022-05-31T16:52:59.85913Z",
267293
"status": "succeeded",
268294
"results": {
269295
"conversations": [
@@ -272,11 +298,11 @@ curl -X GET https://your-language-endpoint-here/language/analyze-conversation
272298
"summaries": [
273299
{
274300
"aspect": "issue",
275-
"text": "Customer tried to set up wifi connection for Smart Brew 300 medication machine, but it didn't work"
301+
"text": "Customer tried to set up wifi connection for Smart Brew 300 machine, but it didn't work"
276302
},
277303
{
278304
"aspect": "resolution",
279-
"text": "Asked customer to try the following steps | Asked customer for the power light | Helped customer to connect to the machine"
305+
"text": "Asked customer to try the following steps | Asked customer for the power light | Checked if the app is prompting to connect to the machine | Transferred the call to a tech support"
280306
}
281307
],
282308
"warnings": []

0 commit comments

Comments
 (0)