Skip to content

java, simplify openai client.tsp#26699

Merged
weidongxu-microsoft merged 6 commits intomainfrom
java_openai-client
Nov 15, 2023
Merged

java, simplify openai client.tsp#26699
weidongxu-microsoft merged 6 commits intomainfrom
java_openai-client

Conversation

@weidongxu-microsoft
Copy link
Member

@weidongxu-microsoft weidongxu-microsoft commented Nov 14, 2023

Simplify client.tsp for Java emitter.

Data Plane API - Pull Request

API Info: The Basics

Most of the information about your service should be captured in the issue that serves as your API Spec engagement record.

  • Link to API Spec engagement record issue:

Is this review for (select one):

  • a private preview
  • a public preview
  • GA release

Change Scope

This section will help us focus on the specific parts of your API that are new or have been modified.
Please share a link to the design document for the new APIs, a link to the previous API Spec document (if applicable), and the root paths that have been updated.

  • Design Document:
  • Previous API Spec Doc:
  • Updated paths:

Viewing API changes

For convenient view of the API changes made by this PR, refer to the URLs provided in the table
in the Generated ApiView comment added to this PR. You can use ApiView to show API versions diff.

Suppressing failures

If one or multiple validation error/warning suppression(s) is detected in your PR, please follow the
Swagger-Suppression-Process
to get approval.

❔Got questions? Need additional info?? We are here to help!

Contact us!

The Azure API Review Board is dedicated to helping you create amazing APIs. You can read about our mission and learn more about our process on our wiki.

Click here for links to tools, specs, guidelines & other good stuff

Tooling

Guidelines & Specifications

Helpful Links

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Nov 14, 2023

Next Steps to Merge

✔️ All automated merging requirements have been met! Refer to step 4 in the PR workflow diagram (even if your PR is for data plane, not ARM).

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Nov 14, 2023

Swagger Validation Report

️️✔️BreakingChange succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️Breaking Change(Cross-Version) succeeded [Detail] [Expand]
There are no breaking changes.
️️✔️CredScan succeeded [Detail] [Expand]
There is no credential detected.
️️✔️LintDiff succeeded [Detail] [Expand]
Validation passes for LintDiff.
️️✔️Avocado succeeded [Detail] [Expand]
Validation passes for Avocado.
️️✔️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.
️️✔️PrettierCheck succeeded [Detail] [Expand]
Validation passes for PrettierCheck.
️️✔️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?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Nov 14, 2023

Swagger Generation Artifacts

️️✔️ApiDocPreview succeeded [Detail] [Expand]
️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

Breaking Changes Tracking

️️✔️ azure-sdk-for-net-track2 succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs]Release - Generate from 6a5b6cd. 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
    command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
  • ️✔️Azure.AI.OpenAI [View full logs]  [Release SDK Changes]
    info	[Changelog]
️❌ azure-sdk-for-java failed [Detail]
  • Failed [Logs]Release - Generate from 6a5b6cd. 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
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.3.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    cmderr	[init.sh] [notice] A new release of pip is available: 23.0.1 -> 23.3.1
    cmderr	[init.sh] [notice] To update, run: pip install --upgrade pip
    command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
    cmderr	[generate.py]  WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@typespec/compiler@0.50.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@typespec/rest@0.50.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@typespec/http@0.50.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@typespec/openapi@0.50.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@typespec/versioning@0.50.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@azure-tools/typespec-azure-core@0.36.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm WARN EBADENGINE Unsupported engine {
    cmderr	[generate.py] npm WARN EBADENGINE   package: '@azure-tools/typespec-client-generator-core@0.36.0',
    cmderr	[generate.py] npm WARN EBADENGINE   required: { node: '>=18.0.0' },
    cmderr	[generate.py] npm WARN EBADENGINE   current: { node: 'v16.20.2', npm: '8.19.4' }
    cmderr	[generate.py] npm WARN EBADENGINE }
    cmderr	[generate.py] npm notice
    cmderr	[generate.py] npm notice New major version of npm available! 8.19.4 -> 10.2.3
    cmderr	[generate.py] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.3>
    cmderr	[generate.py] npm notice Run `npm install -g npm@10.2.3` to update!
    cmderr	[generate.py] npm notice
  • azure-ai-openai [View full logs]  [Release SDK Changes]
️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
  • ️✔️Succeeded [Logs]Release - Generate from 6a5b6cd. 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
    command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
  • ️✔️@azure/openai [View full logs]  [Release SDK Changes]
    info	[Changelog]
    error	breakingChangeTracking is enabled, but version or changelogItem is not found in output.
Posted by Swagger Pipeline | How to fix these errors?

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Nov 14, 2023

Generated ApiView

Language Package Name ApiView Link
.Net Azure.AI.OpenAI https://apiview.dev/Assemblies/Review/481a45dce2a14e8c885b780a4da2afa9
JavaScript @azure/openai There is no API change compared with the previous version

@weidongxu-microsoft weidongxu-microsoft marked this pull request as ready for review November 14, 2023 11:51
@weidongxu-microsoft weidongxu-microsoft changed the title java, openai client.tsp java, simplify openai client.tsp Nov 14, 2023
@jpalvarezl
Copy link
Member

jpalvarezl commented Nov 14, 2023

What version of Java autorest are we using in SDK azure-sdk-for-java check? I was not able to tell which version of autorest is used by the CI for a given language.

Edit: it seems like 0.10.0 judging by the log. I wonder where that value is being taken from 🤔 ? We'd want to run this with 0.11.1, as far as I understand.

@weidongxu-microsoft
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

…ered from public operation getChatCompletions
generate-tests: false
custom-types-subpackage: "implementation.models"
custom-types: "FunctionCallModelBase,FunctionCallPreset,FunctionCallPresetFunctionCallModel,FunctionNameFunctionCallModel"
custom-types: "FunctionCallPreset"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the effect of this change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It moves this model to impl. Maybe we can use @internal

@weidongxu-microsoft weidongxu-microsoft merged commit 6a5b6cd into main Nov 15, 2023
@weidongxu-microsoft weidongxu-microsoft deleted the java_openai-client branch November 15, 2023 03:51
@openapi-pipeline-app
Copy link

Swagger pipeline restarted successfully, please wait for status update in this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TypeSpec Authored with TypeSpec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants