-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Azure OpenAI: reuse LRO response model as status polling model #24556
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
tjprescott
merged 11 commits into
Azure:main
from
trrwilson:user/travisw/aoai-lro-reuse-response-for-polling-state
Jun 29, 2023
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
39dee8f
Azure OpenAI: reuse LRO response model as status polling model
trrwilson 0757acf
Merge branch 'main' into user/travisw/aoai-lro-reuse-response-for-pol…
trrwilson 332c398
incorporate unreachable type omission for limitation of breaking chan…
trrwilson 26f8706
batch rename for new LRO tack
trrwilson 5cbbc2f
Updates after clarification on sync parity snap
trrwilson 98fdcba
Update: adjustments after re-snap to plans for converged sync API
trrwilson 24d8a4c
Merge branch 'main' into user/travisw/aoai-lro-reuse-response-for-pol…
trrwilson 4344311
Adjustments based on feedback and .NET viability experiments
trrwilson 14ca49a
Example naming update (caught by CI)
trrwilson 1393b6e
Example update
trrwilson 827a285
PR feedback and re-disabling ts (will treat separately)
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| **/package.json | ||
| **/package-lock.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
2 changes: 1 addition & 1 deletion
2
...tiveservices/OpenAI.Inference/examples/2023-06-01-preview/get_image_operation_status.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
2 changes: 1 addition & 1 deletion
2
.../cognitiveservices/OpenAI.Inference/examples/2023-06-01-preview/start_generate_image.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
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
57 changes: 57 additions & 0 deletions
57
specification/cognitiveservices/OpenAI.Inference/models/operations.common.tsp
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,57 @@ | ||
| import "@azure-tools/typespec-azure-core"; | ||
| import "@typespec/http"; | ||
|
|
||
| using Azure.Core; | ||
| using TypeSpec.Http; | ||
|
|
||
| namespace Azure.OpenAI; | ||
|
|
||
| @lroStatus | ||
| @doc("The state of a job or item.") | ||
| enum AzureOpenAIOperationState { | ||
| @doc("The operation was created and is queued to be processed in the future.") | ||
| notRunning, | ||
|
|
||
| @doc("The operation has started to be processed.") | ||
| running, | ||
|
|
||
| @lroSucceeded | ||
| @doc("The operation has successfully be processed and is ready for consumption.") | ||
| succeeded, | ||
|
|
||
| @lroCanceled | ||
| @doc("The operation has been canceled and is incomplete.") | ||
| canceled, | ||
|
|
||
| @lroFailed | ||
| @doc("The operation has completed processing with a failure and cannot be further consumed.") | ||
| failed, | ||
| } | ||
|
|
||
| #suppress "@azure-tools/typespec-azure-core/long-running-polling-operation-required" "template" | ||
| @Foundations.Private.needsRoute | ||
| @post | ||
| @doc("Long running operation template to match Azure OpenAI .") | ||
| op OaiLongRunningRpcOperation< | ||
| TParams extends TypeSpec.Reflection.Model, | ||
| TResponse extends TypeSpec.Reflection.Model, | ||
| TStatusResult extends TypeSpec.Reflection.Model, | ||
| TStatusError = Foundations.Error, | ||
| Traits extends TypeSpec.Reflection.Model = {}, | ||
| TErrorResponse = Azure.Core.Foundations.ErrorResponse | ||
| > is Foundations.Operation< | ||
| TParams & | ||
| Azure.Core.Traits.Private.TraitProperties< | ||
| Traits, | ||
| Azure.Core.Traits.TraitLocation.Parameters | ||
| >, | ||
| Azure.Core.Foundations.AcceptedResponse & | ||
| TResponse & | ||
| Foundations.LongRunningStatusLocation<TStatusResult> & | ||
| Azure.Core.Traits.Private.TraitProperties< | ||
| Traits, | ||
| Azure.Core.Traits.TraitLocation.Response | ||
| >, | ||
| Traits, | ||
| TErrorResponse | ||
| >; |
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
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
2 changes: 1 addition & 1 deletion
2
...AzureOpenAI/inference/preview/2023-06-01-preview/examples/get_image_operation_status.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
2 changes: 1 addition & 1 deletion
2
...plane/AzureOpenAI/inference/preview/2023-06-01-preview/examples/start_generate_image.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
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.