-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Azure OpenAI: TypeSpec updates for 2023-12-01-preview #26737
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 19 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
b335550
baseline: add new label with no changes
trrwilson 459447a
reapplication of changes from PR repository
trrwilson 9a583b6
incremental: chat inputs, including tools
trrwilson 4d65865
incremental, in-progress: chat message rework
trrwilson 4b0ddbc
incremental: chat completions updated (undoc'd/unverified)
trrwilson e7eef17
incremental: provisional completeness for chat
trrwilson 5ac2c5c
Incremental: RAI updates
trrwilson b57ad7c
Merge branch 'main' into user/travisw/aoai-2023-12-01-preview-typespec
trrwilson 9e19498
RAI, data-plane, tsp compilation fixes
trrwilson a1eef6f
minor updates after starting .NET integration
trrwilson db40893
small fix to structured text items for vision
trrwilson 21a5fb5
small but important function fix
trrwilson 969b0ef
trial and error: OYD apiKey->key
trrwilson 87a2ac6
minor edit
trrwilson f11bb4c
java emitter config merge
trrwilson 8723846
some PR feedback + tool_calls role fix
trrwilson 65e0c5d
small but important: url is optional in protected_material_code
trrwilson 3848178
add missing layer to image_url
trrwilson c8be3dc
Add speculative finish_details for gpt-4-vision-preview
trrwilson 220c1d0
Reorging files for extensions
jpalvarezl 0d94c71
Using generics
jpalvarezl 7aa12e8
Removed generics approach
jpalvarezl de6f6d9
Fixed various typos and added docs
jpalvarezl 777be6d
Removed super class parameters
jpalvarezl 0f50f5b
Removed LRO entries in client.tsp, since they are removed from spec a…
jpalvarezl 52da00d
WIP
jpalvarezl 77f99e9
removed LRO related definitions
jpalvarezl 9bfa712
Added @client to hide the LRO op
jpalvarezl 02c814f
Moved visibility modifiers to their own source file
jpalvarezl 1e121f7
Annotated Key as removed
jpalvarezl 9489109
Restored LRO as private methods
jpalvarezl 58da246
Merge branch 'main' into jpalvarezl/aoai_extensions_reorg
trrwilson 62a564d
Merge branch 'main' into user/travisw/aoai-2023-12-01-preview-typespec
trrwilson 4e096ae
Merge branch 'jpalvarezl/aoai_extensions_reorg' into user/travisw/aoa…
trrwilson 5d3c90d
PR feedback
trrwilson 1696732
Hid LROs (#26898)
jpalvarezl 921a13c
Merge branch 'main' into user/travisw/aoai-2023-12-01-preview-typespec
trrwilson 7ba16b2
format, recompile, backport optional filename for whisper
trrwilson faa4cce
Merge branch 'user/travisw/aoai-2023-12-01-preview-typespec' of https…
trrwilson 024434b
PR feedback: naming/docs updates
trrwilson f1af967
Added TypeSpec customization support for Java (#26916)
mssfang 3e2daf2
Renamed customization class (#26919)
jpalvarezl a6c6048
Update specification/cognitiveservices/OpenAI.Inference/models/comple…
trrwilson 7ce9dbb
Merge branch 'main' into user/travisw/aoai-2023-12-01-preview-typespec
trrwilson e01c2cf
recompile after accepted/committed feedback fix
trrwilson 397331c
PR feedback: non-optional content_filter_results on prompt model
trrwilson 1933a46
very minor change: one file fix via npx prettier
trrwilson 184593c
missing second half of prettier fix: copied file to data-plane
trrwilson 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
...tiveservices/OpenAI.Inference/examples/2023-12-01-preview/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": "2023-12-01-preview", | ||
| "deploymentId": "<deployment-id>" | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "text": "A structured object when requesting json or verbose_json" | ||
| } | ||
| } | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
...nitiveservices/OpenAI.Inference/examples/2023-12-01-preview/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": "2023-12-01-preview", | ||
| "deploymentId": "<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
...nitiveservices/OpenAI.Inference/examples/2023-12-01-preview/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": "2023-12-01-preview", | ||
| "deploymentId": "<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
...ognitiveservices/OpenAI.Inference/examples/2023-12-01-preview/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": "2023-12-01-preview", | ||
| "deploymentId": "<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
...tion/cognitiveservices/OpenAI.Inference/examples/2023-12-01-preview/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": "2023-12-01-preview", | ||
| "deploymentId": "<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 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
38 changes: 38 additions & 0 deletions
38
...ification/cognitiveservices/OpenAI.Inference/examples/2023-12-01-preview/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,38 @@ | ||
| { | ||
| "operationId": "GetCompletions", | ||
| "title": "Creates a completion for the provided prompt, parameters and chosen model.", | ||
| "parameters": { | ||
| "endpoint": "{endpoint}", | ||
| "api-version": "2023-12-01-preview", | ||
| "deploymentId": "<deployment-id>", | ||
| "body": { | ||
| "prompt": [ | ||
| "tell me a joke about mango" | ||
| ], | ||
| "max_tokens": 32, | ||
| "temperature": 1.0, | ||
| "n": 1 | ||
| } | ||
| }, | ||
| "responses": { | ||
| "200": { | ||
| "body": { | ||
| "id": "cmpl-7QmVI15qgYVllxK0FtxVGG6ywfzaq", | ||
| "created": 1686617332, | ||
| "choices": [ | ||
| { | ||
| "text": "es\n\nWhat do you call a mango who's in charge?\n\nThe head mango.", | ||
| "index": 0, | ||
| "finish_reason": "stop", | ||
| "logprobs": null | ||
| } | ||
| ], | ||
| "usage": { | ||
| "completion_tokens": 20, | ||
| "prompt_tokens": 6, | ||
| "total_tokens": 26 | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
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.