azure-rest-api-specs icon indicating copy to clipboard operation
azure-rest-api-specs copied to clipboard

Azure OpenAI: 2024-04-01-preview updates

Open trrwilson opened this issue 11 months ago • 4 comments

This PR incorporates updates for the 2024-04-01-preview service API version label into the Azure OpenAI TypeSpec project.

It accompanies the base OpenAPI (Swagger) update from this PR: https://github.com/Azure/azure-rest-api-specs/pull/28588

Additions

COMMON

  • Adds timestamp_granularities to Whisper transcription; this is an array of enumerated string values (word and/or segment) that controls which, if any, timestamp information is emitted to transcription results
  • Adds a new audioWord schema type with a word and start and end numbers (peer to audioSegment) -- then added as a peer to segmentsinaudioVerboseResponse`
  • Adds formal support for wav and pcm values to createSpeechRequest's response_format

AOAI ONLY

  • Adds a new RAI content filter schema type, contentFilterDetailedResults, that features:
    • The boolean filtered property from contentFilterResultBase
    • An array named details of the existing contentFilterIdResult types, each of which has:
      • The base boolean filtered
      • A string id
  • Updates custom_blocklists to use the new contentFilterDetailedResults object (prior: a direct array of contentFilterIdResult
  • Adds a new indirect_attack contentFilterDetectedResult to contentFilterPromptResults -- this is a peer to and the same type as the existing jailbreak

Notes

  • The AOAI filtered property is abstracted into an alias propagated via the ...spread operator. This resulted in superficial order swaps of the filtered property in earlier-version generated API documents, but no semantic change is present.

trrwilson avatar Mar 27 '24 00:03 trrwilson

Next Steps to Merge

Next steps that must be taken to merge this PR:
  • ❌ This PR has at least one change violating Azure versioning policy (label: VersioningReviewRequired).
    To unblock this PR, either introduce a new API version with these changes instead of modifying an existing API version To unblock this PR, follow the process at aka.ms/brch.
  • ❌ The required check named Swagger BreakingChange has failed. To unblock this PR, follow the process at aka.ms/brch.

Swagger Validation Report

️❌BreakingChange: 9 Errors, 0 Warnings failed [Detail]
Compared specs (v0.10.8) new version base version
generated.json 2023-06-01-preview(d516a4a) 2023-06-01-preview(main)
generated.json 2023-07-01-preview(d516a4a) 2023-07-01-preview(main)
generated.json 2024-02-15-preview(d516a4a) 2024-02-15-preview(main)
generated.json 2024-03-01-preview(d516a4a) 2024-03-01-preview(main)
generated.json 2024-04-01-preview(d516a4a) 2024-04-01-preview(main)
Rule Message
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L62:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L117:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L191:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L259:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L331:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L382:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L433:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L486:5
1038 - AddedPath The new version is adding a path that was not found in the old version.
New: inference/preview/2024-04-01-preview/generated.json#L556:5
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️⚠️LintDiff: 0 Warnings warning [Detail]
Compared specs (v2.2.2) new version base version
release_2023_06_01_preview_autogen release_2023_06_01_preview_autogen(d516a4a) release_2023_06_01_preview_autogen(main)
release_2023_07_01_preview_autogen release_2023_07_01_preview_autogen(d516a4a) release_2023_07_01_preview_autogen(main)
release_2024_02_15_preview_autogen release_2024_02_15_preview_autogen(d516a4a) release_2024_02_15_preview_autogen(main)
release_2024_03_01_preview_autogen release_2024_03_01_preview_autogen(d516a4a) release_2024_03_01_preview_autogen(main)

The following errors/warnings exist before current PR submission:

Only 30 items are listed, please refer to log for more details.

Rule Message
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L793
DefaultInEnum Default value should appear in the enum constraint for a schema
Location: inference/preview/2023-06-01-preview/generated.json#L1289
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-06-01-preview/generated.json#L1353
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L423
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L494
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L846
DefaultInEnum Default value should appear in the enum constraint for a schema
Location: inference/preview/2023-07-01-preview/generated.json#L1386
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2023-07-01-preview/generated.json#L1450
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-02-15-preview/generated.json#L1785
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-02-15-preview/generated.json#L2428
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-02-15-preview/generated.json#L3430
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-03-01-preview/generated.json#L1785
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-03-01-preview/generated.json#L2428
IntegerTypeMustHaveFormat The integer type does not have a format, please add it.
Location: inference/preview/2024-03-01-preview/generated.json#L3461
:warning: SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L46
:warning: SecurityDefinitionDescription Security definition should have a description.
Location: inference/preview/2023-06-01-preview/generated.json#L51
:warning: OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L64
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L70
:warning: OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L115
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L121
:warning: PaginationResponse Operation might be pageable. Consider adding the x-ms-pageable extension.
Location: inference/preview/2023-06-01-preview/generated.json#L165
:warning: OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L166
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L172
:warning: LongRunningOperationsOptionsValidator A LRO Post operation with return schema must have 'x-ms-long-running-operation-options' extension enabled.
Location: inference/preview/2023-06-01-preview/generated.json#L215
:warning: OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L217
:warning: OperationId OperationId should be of the form 'Noun_Verb'
Location: inference/preview/2023-06-01-preview/generated.json#L269
:warning: PathParameterSchema Path parameter should specify a maximum length (maxLength) and characters allowed (pattern).
Location: inference/preview/2023-06-01-preview/generated.json#L275
:warning: EnumInsteadOfBoolean Booleans properties are not descriptive in all cases and can make them to use, evaluate whether is makes sense to keep the property as boolean or turn it into an enum.
Location: inference/preview/2023-06-01-preview/generated.json#L598
️❌Avocado: 17 Errors, 0 Warnings failed [Detail]
Rule Message
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_audio_speech.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_audio_transcription_object.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_audio_transcription_text.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_audio_translation_object.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_audio_translation_text.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_chat_completions.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_completions.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_embeddings.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_aml_index.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_azure_search_advanced.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_azure_search_image_vector.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_azure_search_minimum.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_cosmos_db.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_elasticsearch.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_extensions_chat_completions_pinecone.json
UNREFERENCED_JSON_FILE The example JSON file is not referenced from the swagger file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: preview/2024-04-01-preview/examples/generated_image_generation.json
UNREFERENCED_JSON_FILE The swagger JSON file is not referenced from the readme file.
readme: data-plane/AzureOpenAI/inference/readme.md
json: inference/preview/2024-04-01-preview/generated.json
️️✔️SwaggerAPIView succeeded [Detail] [Expand]
️️✔️TypeSpecAPIView succeeded [Detail] [Expand]
️️✔️ModelValidation succeeded [Detail] [Expand]
Validation passes for ModelValidation.
️️✔️SemanticValidation succeeded [Detail] [Expand]
Validation passes for SemanticValidation.
️️✔️PoliCheck succeeded [Detail] [Expand]
Validation passed for PoliCheck.
️️✔️SpellCheck succeeded [Detail] [Expand]
Validation passes for SpellCheck.
️️✔️Lint(RPaaS) succeeded [Detail] [Expand]
Validation passes for Lint(RPaaS).
️️✔️PR Summary succeeded [Detail] [Expand]
Validation passes for Summary.
️️✔️Automated merging requirements met succeeded [Detail] [Expand]
Posted by Swagger Pipeline | How to fix these errors?

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
 Please click here to preview with your @microsoft account. 
️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded in generating from e088bcbfaf55fc1294d0364e7c35e2a1e21543d9. SDK Automation 14.0.0
    command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-net-track2 not found in swagger-to-sdk
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.AI.OpenAI [Preview SDK Changes]
    • Azure.AI.OpenAI.1.0.0-alpha.20240521.1.nupkg
    info	[Changelog]
️️✔️ azure-sdk-for-java succeeded [Detail] [Expand]
  • ️✔️Succeeded in generating from e088bcbfaf55fc1294d0364e7c35e2a1e21543d9. SDK Automation 14.0.0
    command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-java not found in swagger-to-sdk
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
  • ️✔️azure-ai-openai [Preview SDK Changes]
    • pom.xml
    • azure-ai-openai-1.0.0-beta.9-sources.jar
    • azure-ai-openai-1.0.0-beta.9.jar
️❌ azure-sdk-for-js failed [Detail]
  • Code Generator Failed in generating from e088bcbfaf55fc1294d0364e7c35e2a1e21543d9. SDK Automation 14.0.0
    command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
    warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
    warn		specification/cognitiveservices/data-plane/AzureOpenAI/inference/readme.md skipped due to azure-sdk-for-js not found in swagger-to-sdk
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
    cmderr	[automation_generate.sh] [ERROR] Command failed: pwsh ./eng/common/scripts/TypeSpec-Project-Process.ps1 /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cognitiveservices/OpenAI.Inference e088bcbfaf55fc1294d0364e7c35e2a1e21543d9 https://github.com/Azure/azure-rest-api-specs
    cmderr	[automation_generate.sh] [ERROR] Command failed: pwsh ./eng/common/scripts/TypeSpec-Project-Process.ps1 /mnt/vss/_work/1/s/azure-rest-api-specs/specification/cognitiveservices/OpenAI.Inference e088bcbfaf55fc1294d0364e7c35e2a1e21543d9 https://github.com/Azure/azure-rest-api-specs
    error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-js]: sh .scripts/automation_generate.sh
    warn	Skip package processing as generation is failed
Posted by Swagger Pipeline | How to fix these errors?