-
Notifications
You must be signed in to change notification settings - Fork 5.6k
[OpenAI] Added missing GA service versions, 2024-02-01 and 2024-06-01 #29424
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2a5df13
added a missing GA service version
mssfang e9d1afd
add the generated.json 2024-02-01 but looks different to inference.json
mssfang f1bdd65
add the 2024-06-01 service API version
mssfang a9ddbb3
resolve conflict
mssfang e25fb33
remove self introudced new generated.json from 2024-02-01
mssfang fbf02b2
Merge branch 'main' into OpenAI-2024-02-01
mssfang d6c2305
added operation id
mssfang 98b8385
Merge branch 'OpenAI-2024-02-01' of https://github.com/Azure/azure-re…
mssfang 9695aad
Update specification/ai/Face/tspconfig.yaml
mssfang f2df917
Ran npx tsv command
jpalvarezl c1eeb0c
copied from previous examples
mssfang cee5d35
Merge branch 'OpenAI-2024-02-01' of https://github.com/Azure/azure-re…
mssfang 5bf20c4
added generated swagger version into readme
mssfang 3c72de2
fixed "Missing required property: deployment-id"
mssfang 5328d35
run tsp compile
mssfang 470e662
generated.json with generated_ prefix json file.
mssfang 9fa8624
revert the data-plane changes for inference.json
mssfang 98cb3b3
add generated.json updates
mssfang 8fab2dd
suppress spellcheck failures
mssfang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...on/cognitiveservices/OpenAI.Inference/examples/2024-02-01/audio_transcription_object.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "operationId": "GetAudioTranscriptionAsResponseObject", | ||
| "title": "Gets transcribed text and associated metadata from provided spoken audio data.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "text": "A structured object when requesting json or verbose_json" | ||
| } | ||
| } | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...tion/cognitiveservices/OpenAI.Inference/examples/2024-02-01/audio_transcription_text.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "operationId": "GetAudioTranscriptionAsPlainText", | ||
| "title": "Gets transcribed text and associated metadata from provided spoken audio data.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "type": "string", | ||
| "example": "plain text when requesting text, srt, or vtt" | ||
| } | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
...tion/cognitiveservices/OpenAI.Inference/examples/2024-02-01/audio_translation_object.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "operationId": "GetAudioTranslationAsResponseObject", | ||
| "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "text": "A structured object when requesting json or verbose_json" | ||
| } | ||
| } | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...cation/cognitiveservices/OpenAI.Inference/examples/2024-02-01/audio_translation_text.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| { | ||
| "operationId": "GetAudioTranslationAsPlainText", | ||
| "title": "Gets English language transcribed text and associated metadata from provided spoken audio data.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": "---multipart-boundary\nContent-Disposition: form-data; name=\"file\"; filename=\"file.wav\"\nContent-Type: application/octet-stream\n\nRIFF..audio.data.omitted\n---multipart-boundary--" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "type": "string", | ||
| "example": "plain text when requesting text, srt, or vtt" | ||
| } | ||
| } | ||
| } |
44 changes: 44 additions & 0 deletions
44
specification/cognitiveservices/OpenAI.Inference/examples/2024-02-01/chat_completions.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| { | ||
| "operationId": "GetChatCompletions", | ||
| "title": "Creates a completion for the provided prompt, parameters and chosen model.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": { | ||
| "messages": [ | ||
| { | ||
| "role": "system", | ||
| "content": "you are a helpful assistant that talks like a pirate" | ||
| }, | ||
| { | ||
| "role": "user", | ||
| "content": "can you tell me how to care for a parrot?" | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", | ||
| "created": 1686676106, | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "Ahoy matey! So ye be wantin' to care for a fine squawkin' parrot, eh? Well, shiver me timbers, let ol' Cap'n Assistant share some wisdom with ye! Here be the steps to keepin' yer parrot happy 'n healthy:\n\n1. Secure a sturdy cage: Yer parrot be needin' a comfortable place to lay anchor! Be sure ye get a sturdy cage, at least double the size of the bird's wingspan, with enough space to spread their wings, yarrrr!\n\n2. Perches 'n toys: Aye, parrots need perches of different sizes, shapes, 'n textures to keep their feet healthy. Also, a few toys be helpin' to keep them entertained 'n their minds stimulated, arrrh!\n\n3. Proper grub: Feed yer feathered friend a balanced diet of high-quality pellets, fruits, 'n veggies to keep 'em strong 'n healthy. Give 'em fresh water every day, or ye’ll have a scurvy bird on yer hands!\n\n4. Cleanliness: Swab their cage deck! Clean their cage on a regular basis: fresh water 'n food daily, the floor every couple of days, 'n a thorough scrubbing ev'ry few weeks, so the bird be livin' in a tidy haven, arrhh!\n\n5. Socialize 'n train: Parrots be a sociable lot, arrr! Exercise 'n interact with 'em daily to create a bond 'n maintain their mental 'n physical health. Train 'em with positive reinforcement, treat 'em kindly, yarrr!\n\n6. Proper rest: Yer parrot be needin' ’bout 10-12 hours o' sleep each night. Cover their cage 'n let them slumber in a dim, quiet quarter for a proper night's rest, ye scallywag!\n\n7. Keep a weather eye open for illness: Birds be hidin' their ailments, arrr! Be watchful for signs of sickness, such as lethargy, loss of appetite, puffin' up, or change in droppings, and make haste to a vet if need be.\n\n8. Provide fresh air 'n avoid toxins: Parrots be sensitive to draft and pollutants. Keep yer quarters well ventilated, but no drafts, arrr! Be mindful of toxins like Teflon fumes, candles, or air fresheners.\n\nSo there ye have it, me hearty! With proper care 'n commitment, yer parrot will be squawkin' \"Yo-ho-ho\" for many years to come! Good luck, sailor, and may the wind be at yer back!" | ||
| } | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 557, | ||
| "prompt_tokens": 33, | ||
| "total_tokens": 590 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
97 changes: 97 additions & 0 deletions
97
...services/OpenAI.Inference/examples/2024-02-01/chat_completions_azure_search_advanced.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| { | ||
| "operationId": "GetChatCompletionsWithAzureExtensions", | ||
| "title": "Creates a completion based on Azure Search vector data, previous assistant message and user-assigned managed identity.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": { | ||
| "messages": [ | ||
| { | ||
| "role": "user", | ||
| "content": "can you tell me how to care for a cat?" | ||
| }, | ||
| { | ||
| "role": "assistant", | ||
| "content": "Content of the completion [doc1].", | ||
| "context": { | ||
| "intent": "cat care" | ||
| } | ||
| }, | ||
| { | ||
| "role": "user", | ||
| "content": "how about dog?" | ||
| } | ||
| ], | ||
| "data_sources": [ | ||
| { | ||
| "type": "azure_search", | ||
| "parameters": { | ||
| "endpoint": "https://your-search-endpoint.search.windows.net/", | ||
| "authentication": { | ||
| "type": "user_assigned_managed_identity", | ||
| "managed_identity_resource_id": "/subscriptions/{subscription-id}/resourceGroups/{resource-group}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{resource-name}" | ||
| }, | ||
| "index_name": "{index name}", | ||
| "query_type": "vector", | ||
| "embedding_dependency": { | ||
| "type": "deployment_name", | ||
| "deployment_name": "{embedding deployment name}" | ||
| }, | ||
| "in_scope": true, | ||
| "top_n_documents": 5, | ||
| "strictness": 3, | ||
| "role_information": "You are an AI assistant that helps people find information.", | ||
| "fields_mapping": { | ||
| "content_fields_separator": "\\n", | ||
| "content_fields": [ | ||
| "content" | ||
| ], | ||
| "filepath_field": "filepath", | ||
| "title_field": "title", | ||
| "url_field": "url", | ||
| "vector_fields": [ | ||
| "contentvector" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", | ||
| "created": 1686676106, | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "Content of the completion [doc1].", | ||
| "context": { | ||
| "citations": [ | ||
| { | ||
| "content": "Citation content 2.", | ||
| "title": "Citation Title 2", | ||
| "filepath": "contoso2.txt", | ||
| "url": "https://contoso.blob.windows.net/container/contoso2.txt", | ||
| "chunk_id": "0" | ||
| } | ||
| ], | ||
| "intent": "dog care" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 557, | ||
| "prompt_tokens": 33, | ||
| "total_tokens": 590 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
64 changes: 64 additions & 0 deletions
64
...eservices/OpenAI.Inference/examples/2024-02-01/chat_completions_azure_search_minimum.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| { | ||
| "operationId": "GetChatCompletionsWithAzureExtensions", | ||
| "title": "Creates a completion based on Azure Search data and system-assigned managed identity.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": { | ||
| "messages": [ | ||
| { | ||
| "role": "user", | ||
| "content": "can you tell me how to care for a dog?" | ||
| } | ||
| ], | ||
| "data_sources": [ | ||
| { | ||
| "type": "azure_search", | ||
| "parameters": { | ||
| "endpoint": "https://your-search-endpoint.search.windows.net/", | ||
| "index_name": "{index name}", | ||
| "authentication": { | ||
| "type": "system_assigned_managed_identity" | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", | ||
| "created": 1686676106, | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "Content of the completion [doc1].", | ||
| "context": { | ||
| "citations": [ | ||
| { | ||
| "content": "Citation content.", | ||
| "title": "Citation Title", | ||
| "filepath": "contoso.txt", | ||
| "url": "https://contoso.blob.windows.net/container/contoso.txt", | ||
| "chunk_id": "0" | ||
| } | ||
| ], | ||
| "intent": "dog care" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 557, | ||
| "prompt_tokens": 33, | ||
| "total_tokens": 590 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
78 changes: 78 additions & 0 deletions
78
...on/cognitiveservices/OpenAI.Inference/examples/2024-02-01/chat_completions_cosmos_db.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| { | ||
| "operationId": "GetChatCompletionsWithAzureExtensions", | ||
| "title": "Creates a completion for the provided Azure Cosmos DB.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2024-02-01", | ||
| "deployment-id": "<deployment-id>", | ||
| "body": { | ||
| "messages": [ | ||
| { | ||
| "role": "user", | ||
| "content": "can you tell me how to care for a dog?" | ||
| } | ||
| ], | ||
| "data_sources": [ | ||
| { | ||
| "type": "azure_cosmos_db", | ||
| "parameters": { | ||
| "authentication": { | ||
| "type": "connection_string", | ||
| "connection_string": "mongodb+srv://rawantest:{password}$@{cluster-name}.mongocluster.cosmos.azure.com/?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000" | ||
| }, | ||
| "database_name": "vectordb", | ||
| "container_name": "azuredocs", | ||
| "index_name": "azuredocindex", | ||
| "embedding_dependency": { | ||
| "type": "deployment_name", | ||
| "deployment_name": "{embedding deployment name}" | ||
| }, | ||
| "fields_mapping": { | ||
| "content_fields": [ | ||
| "content" | ||
| ], | ||
| "vector_fields": [ | ||
| "contentvector" | ||
| ] | ||
| } | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "chatcmpl-7R1nGnsXO8n4oi9UPz2f3UHdgAYMn", | ||
| "created": 1686676106, | ||
| "choices": [ | ||
| { | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "message": { | ||
| "role": "assistant", | ||
| "content": "Content of the completion [doc1].", | ||
| "context": { | ||
| "citations": [ | ||
| { | ||
| "content": "Citation content.", | ||
| "title": "Citation Title", | ||
| "filepath": "contoso.txt", | ||
| "url": "https://contoso.blob.windows.net/container/contoso.txt", | ||
| "chunk_id": "0" | ||
| } | ||
| ], | ||
| "intent": "dog care" | ||
| } | ||
| } | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 557, | ||
| "prompt_tokens": 33, | ||
| "total_tokens": 590 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.