Skip to content

Commit a5abde4

Browse files
committed
updating REST API output
1 parent f10c1bc commit a5abde4

File tree

1 file changed

+26
-15
lines changed

1 file changed

+26
-15
lines changed

articles/ai-services/openai/includes/use-your-data-rest.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,37 @@ curl -i -X POST $AZURE_OPENAI_ENDPOINT/openai/deployments/$AZURE_OPENAI_DEPLOYME
5151
```json
5252
{
5353
"id": "12345678-1a2b-3c4e5f-a123-12345678abcd",
54-
"model": "",
55-
"created": 1684304924,
56-
"object": "chat.completion",
54+
"model": "gpt-4",
55+
"created": 1709835345,
56+
"object": "extensions.chat.completion",
5757
"choices": [
5858
{
5959
"index": 0,
60-
"messages": [
61-
{
62-
"role": "tool",
63-
"content": "{\"citations\": [{\"content\": \"\\nAzure AI services are cloud-based artificial intelligence (AI) services...\", \"id\": null, \"title\": \"What is Azure AI services\", \"filepath\": null, \"url\": null, \"metadata\": {\"chunking\": \"orignal document size=250. Scores=0.4314117431640625 and 1.72564697265625.Org Highlight count=4.\"}, \"chunk_id\": \"0\"}], \"intent\": \"[\\\"Learn about Azure AI services.\\\"]\"}",
64-
"end_turn": false
65-
},
66-
{
67-
"role": "assistant",
68-
"content": " \nAzure AI services are cloud-based artificial intelligence (AI) services that help developers build cognitive intelligence into applications without having direct AI or data science skills or knowledge. [doc1]. Azure Machine Learning is a cloud service for accelerating and managing the machine learning project lifecycle. [doc1].",
69-
"end_turn": true
60+
"finish_reason": "stop",
61+
"message": {
62+
"role": "assistant",
63+
"content": "An interesting fact from the retrieved document is... [doc1].",
64+
"end_turn": true,
65+
"context": {
66+
"citations": [
67+
{
68+
"content": "...",
69+
"title": "...",
70+
"url": "https://mysearch.blob.core.windows.net/xyz/001.txt",
71+
"filepath": "001.txt",
72+
"chunk_id": "0"
73+
}
74+
],
75+
"intent": "[\"Interesting facts\"]"
7076
}
71-
]
77+
}
7278
}
73-
]
79+
],
80+
"usage": {
81+
"prompt_tokens": 3779,
82+
"completion_tokens": 105,
83+
"total_tokens": 3884
84+
}
7485
}
7586
```
7687

0 commit comments

Comments
 (0)