Skip to content
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

Feature/cognitiveservices/openai cadl #21574

Conversation

johanste
Copy link
Member

Used more azure core constructs in OAI authoring spec

@openapi-workflow-bot
Copy link

Hi, @johanste Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Nov 16, 2022

    Swagger Validation Report

    ️️✔️BreakingChange succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.
    ️❌Avocado: 3 Errors, 0 Warnings failed [Detail]
    Rule Message
    MISSING_README Can not find readme.md in the folder. If no readme.md file, it will block SDK generation.
    folder: cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview
    MISSING_README Can not find readme.md in the folder. If no readme.md file, it will block SDK generation.
    folder: c30e7e922984d1b900c5b38472268e5c8bdbb9c6/specification/cognitiveservices/OpenAI.Authoring
    MISSING_README Can not find readme.md in the folder. If no readme.md file, it will block SDK generation.
    folder: specification/cognitiveservices/OpenAI.Authoring/models
    ️❌ModelValidation: 19 Errors, 0 Warnings failed [Detail]
    Rule Message
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Deployments_List.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L59:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Deployments_Create.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L83:15
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Deployments_Get.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L185:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Deployments_Update.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L216:16
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Deployments_Delete.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L370:17
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_List.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L400:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_Upload.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L424:15
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_Get.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L529:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_Delete.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L560:17
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_GetFileContent.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L590:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Files_Import.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L623:15
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_List.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L665:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_Create.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L689:15
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_Get.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L729:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_Delete.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L760:17
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_Cancel.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L790:15
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in FineTunes_Events.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L823:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Models_List.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L863:14
    XMS_EXAMPLE_NOTFOUND_ERROR x-ms-example not found in Models_Get.
    Url: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L889:14
    ️️✔️SemanticValidation succeeded [Detail] [Expand]
    Validation passes for SemanticValidation.
    ️️✔️PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️❌SpellCheck: 2 Errors, 0 Warnings failed [Detail]
    Rule Message
    HowToFix Unknown word (updateable), please fix the error or add words to ./custom-words.txt
    path: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L106:55
    HowToFix Unknown word (updateable), please fix the error or add words to ./custom-words.txt
    path: OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json#L447:55
    ️❌CadlValidation: 2 Errors, 0 Warnings failed [Detail]
    Rule Message
    MissingCadlFile "details":"The swagger specification/cognitiveservices/OpenAI.Authoring/cadl-output/2022-06-01-preview/openapi.json is generated from cadl files,
    but the cadl file is missing in the PR."
    MissingPackageJson "details":"The 'package.json' is missing in the cadl folder spe,
    please ensure the 'package.json' is added in the PR."
    ️️✔️PR Summary succeeded [Detail] [Expand]
    Validation passes for Summary.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Nov 16, 2022

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking

    Posted by Swagger Pipeline | How to fix these errors?

    @ghost ghost added the Cognitive Services label Nov 16, 2022
    @openapi-pipeline-app
    Copy link

    Swagger pipeline started successfully. If there is ApiView generated, it will be updated in this comment.

    @AzureRestAPISpecReview AzureRestAPISpecReview added the Cadl Authored with Cadl label Nov 16, 2022
    @glharper glharper marked this pull request as ready for review November 17, 2022 19:20
    @glharper glharper requested a review from yangyuan as a code owner November 17, 2022 19:20
    @glharper glharper merged commit e882fb1 into Azure:feature/cognitiveservices/openai-cadl Nov 17, 2022
    lmazuel added a commit that referenced this pull request Feb 3, 2023
    * Initial commit.
    
    * Commit OpenAI inference cadl files.
    
    * use non-deprecated service decorator
    
    * Fixes to main
    
    * Reverted changes
    
    * use latest cadl to sync with vs code properly
    
    * cadl compilation works for authoring (but it is correct?)
    
    * Cleaned up routes and model for Inference REST CADL spec
    
    * Added cadl-output to .gitignore file and removed error response
    
    * Implemented polymorphic return for endpoint
    
    * enable Files_Import as non-standard operation, use standard operation names
    
    * Authoring CADL now emits openAPI schema almost identical to current Authoring schema
    
    * Empty model used for polymorphic expectation in embedding endpoint
    
    * Renamed models to match convention
    
    * Renamed completions related models
    
    * Adjusted comment for embeddings body types
    
    * Split up models.cadl into completions and embeddings files
    
    * Renamed models
    
    * Refactored model names
    
    * Removed redundants bits of model names
    
    * added headers
    
    * Added header to correct model
    
    * break up monolithic routes and model cadl files
    
    * add namespace to all models
    
    * Removed gitIgnore file and changed files to not have domain related namespaces
    
    * Finished embeddings endpoint and verified against source json
    
    * Verified round trip for swagger
    
    * Almost done with security types
    
    * Configured correctly OAth2
    
    * Add Auth and OAuth2 to service (thanks Jose!)
    
    * Add auth and OAuth to openapi json
    
    * Review comments
    
    * Review comments
    
    * camel casing
    
    * add versionedDependency
    
    * better versioning
    
    * Added the apiview emitter to OpenAI.Inference endpoints
    
    * PR feedback for Inference endpoints
    
    * Feature/cognitiveservices/openai cadl (#21574)
    
    * Added openai specific list API op template.
    
    * Simplified OAI authoring cadl
    
    * update package versions, correct camelCase warning in common
    
    * remove commented out models, changed AcceptedResponse to CreatedResponse
    
    * Reverted completion to use snake_casing and removed the Response and Request namespaces
    
    * reverted to snake_casing and removed Request namespace for embeddings
    
    * Added missing namespace declaration in embeddings
    
    * Updated dependencies and enabled csharp emitter for Inference
    
    * use string literals for now as enum value types (TypeDiscriminatorKnownValues) not supported in csharp emitter
    
    * Add TODO to TypeDiscriminatorKnownValues def
    
    * More specific route operation names, use snake casing for all model fields
    
    * Added more options to csharp emitter
    
    * Simplify OpenAI inferrence models and use core (#21609)
    
    * Simplify OpenAI inferrence models and use core
    
    * Simplified and corrected Cadl type usage for OpenAI.Inference
    
    * Fix camel case issues.
    
    Co-authored-by: tjprescott <[email protected]>
    
    * Upgrade Cadl file to 0.38 for OpenAI.Authoring service  (#22104)
    
    * Upgrade Cadl file to 0.38
    
    * Upgrade the package.json file and relevant cadl decorator
    
    * Embedding in Azure do not support integer (#22091)
    
    * Fix auth in OpenAI CADL (#22191)
    
    * Change aliases to models, renamed model Embedding to EmbeddingItem to avoid conflicts, and Completion types
    
    * Changed prompt into string[][]
    
    * update package name (#22312)
    
    * Archboard feedback (#22315)
    
    * Archboard feedback
    
    * Disable stream for now
    
    * Rename to options
    
    * Fix operation name (#22319)
    
    * Feature/openai add missing usage (#22337)
    
    * add new API version and usage field on completions and embeddings
    
    * typo
    
    * Added docs for Usage classes in completions and embeddings
    
    * Added versioning mark for new usage model
    
    * Added disambiguation for names and removed unnecessary versioning decorator
    
    * Removed unused version bump
    
    * Removed unused version from enum
    
    * Removed wrong annotation
    
    ---------
    
    Co-authored-by: Jose Alvarez <[email protected]>
    
    * Update main.cadl (#22362)
    
    * Embeddings model and field documentation and fix to models (#22368)
    
    * Moved usage to the response object of embeddings and added some basic documentation to models and fields
    
    * Fixed typo
    
    * Update specification/cognitiveservices/OpenAI.Inference/models/embeddings.create.cadl
    
    ---------
    
    Co-authored-by: Laurent Mazuel <[email protected]>
    
    * Removing Model from model name and removing unnecessary aliases (#22390)
    
    * updated deps and added visibility decorator to deploymentId (#22417)
    
    * Made CompletionsOptions.model optional again
    
    * Removing ...Models namespace in the C# classes (#22449)
    
    * AOAI: fix CompletionsUsage model (#22439)
    
    ---------
    
    Co-authored-by: tjprescott <[email protected]>
    Co-authored-by: Glenn Harper <[email protected]>
    Co-authored-by: Jose Alvarez <[email protected]>
    Co-authored-by: Glenn Harper <[email protected]>
    Co-authored-by: Johan Stenberg (MSFT) <[email protected]>
    Co-authored-by: Mary Gao <[email protected]>
    Co-authored-by: m-nash <[email protected]>
    Co-authored-by: Jose Alvarez <[email protected]>
    Co-authored-by: Travis Wilson <[email protected]>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    Cadl Authored with Cadl Cognitive Services
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants