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

Attempt to merge Darren's branch #32066

Merged

Conversation

trangevi
Copy link
Member

@trangevi trangevi commented Jan 9, 2025

Choose a PR Template

Switch to "Preview" on this description then select one of the choices below.

Click here to open a PR for a Data Plane API.

Click here to open a PR for a Control Plane (ARM) API.

Click here to open a PR for only SDK configuration.

dargilco and others added 23 commits August 19, 2024 10:55
…ted models to use the work `choice` instead of selection, similar to OAI TypeSpec
* Add support for structured outputs

Signed-off-by: trangevi <[email protected]>
Copy link

openapi-pipeline-app bot commented Jan 9, 2025

Next Steps to Merge

⌛ Please wait. Next steps to merge this PR are being evaluated by automation. ⌛

Copy link

openapi-pipeline-app bot commented Jan 9, 2025

Generated ApiView

Language Package Name ApiView Link
TypeSpec ModelClient https://apiview.dev/Assemblies/Review/aa230d385fde45d69086ce67b31b9f48?revisionId=1c8c13e2550a4fe9952bd1a80f903422

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jan 9, 2025

API change check

APIView has identified API level changes in this PR and created following API reviews.

DocumentIntelligence
Face
AI.Model
AzureHealthInsights
ImageAnalysis
Azure.AI.OpenAI.Assistants

@glharper glharper marked this pull request as ready for review January 22, 2025 16:11
@glharper glharper requested a review from a team as a code owner January 22, 2025 16:11
@glharper glharper requested review from JeffreyRichter and mario-guerra and removed request for a team January 22, 2025 16:11
@trangevi trangevi merged commit 618b62a into Azure:glharper-inference-ts-dpg Jan 22, 2025
16 of 25 checks passed
trangevi added a commit that referenced this pull request Mar 28, 2025
* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update tspconfig.yaml

* Update client.tsp

* Update client.tsp - remove embeddingsClient and ImageEmbeddingsClient

* Update tspconfig.yaml

* Update main.tsp

* Update main.tsp

* change namespace to Model

* use namespace AI.Model

* Use AI.Model instead of ModelClient

* Update client.tsp

* Delete specification/ai/ModelClient/models/image_embeddings.tsp

* Delete specification/ai/ModelClient/models/embeddings.tsp

* Update common.tsp

* Update routes.tsp

* Update client.tsp

* Update chat_completions.tsp

* Update chat_completions.tsp

* access fix

* use model keyword

* trying to fix ts gen

* more fixes

* more fixes

* revert chatcompletionsoptions to alias

* revert to alias

* Update tspconfig.yaml

* Update client.tsp

* Attempt to merge Darren's branch (#32066)

* Go back to `parameters?: unknown` in FunctionDefinition model

* Add missing CompletionsFinishReason comments. Update tool choice related models to use the work `choice` instead of selection, similar to OAI TypeSpec

* Update JSON examples. Fix client.tsp after previous commit to rename models

* Add ID back to EmbeddingsResult model. Add comment to getModelInfo that it only works for MaaS/MaaP

* Update comments about hand-written operator methods

* Update teh ModelInfo enum

* Rename EmbeddingInput to ImageEmbeddingInput (#31953)

* Add Structured Outputs (#31962)

* Add support for structured outputs

Signed-off-by: trangevi <[email protected]>

* Naming consistency (#31966)

Signed-off-by: trangevi <[email protected]>

* Fixes following `npx tsp format **\*.tsp`

* Fix a couple of errors from `npx tsv .`

* Add missing class description. Add updated swagger file

* Update description

* Remove the in-line definition

* Make all response format models internal (#32005)

* Update client.tsp - alias ChatCompletionsResponseFormatJsonObject in JS to avoid breaking change

* Update chat_completions.tsp

---------

Signed-off-by: trangevi <[email protected]>
Co-authored-by: Darren Cohen <[email protected]>
Co-authored-by: Glenn Harper <[email protected]>

* Make ChatCompletionsOptions public in Java

* add alias for ChatCompletionsResponseFormatJsonObject

* add developer chat role

* remove java specific augment

* use correct names for audio content classes

* fix tsp error

* fix anonymous object error (#33514)

Signed-off-by: trangevi <[email protected]>

* Merge main inference branch into js feature branch (#33451)

* Apply new local cspell

* Fix wrongly deleted new cspell in the root

* Add developer role to support new GPT models (#32474)

* Fix tcgc error due to Record<unknown> (#32719)

* Fix tcgc error due to Record<unknown>

Signed-off-by: trangevi <[email protected]>

* Update other options objects to model

Signed-off-by: trangevi <[email protected]>

* Fix compile errors. Update swagger

Signed-off-by: trangevi <[email protected]>

---------

Signed-off-by: trangevi <[email protected]>

* Merge C# feature branch into primary Azure.AI.Inference branch (#31869)

* Update ImageEmbeddingsClient to change embed to embedImage

Signed-off-by: Travis Angevine <[email protected]>

* Add typespec-csharp to the tspconfig

Signed-off-by: Travis Angevine <[email protected]>

* Move csharp client property renames

Signed-off-by: Travis Angevine <[email protected]>

* Missing semicolons

Signed-off-by: Travis Angevine <[email protected]>

* Wrong namespace

Signed-off-by: Travis Angevine <[email protected]>

* Incorrect namespaces

Signed-off-by: Travis Angevine <[email protected]>

* Aliases need to have things referenced differently, apparently

Signed-off-by: Travis Angevine <[email protected]>

* Need to specify parameters?

Signed-off-by: Travis Angevine <[email protected]>

* Move alias renames to the individual file for now

Signed-off-by: Travis Angevine <[email protected]>

* Change ChatCompletionsOptions to a model

Signed-off-by: Travis Angevine <[email protected]>

* syntax

Signed-off-by: Travis Angevine <[email protected]>

* Leave the model property

Signed-off-by: Travis Angevine <[email protected]>

* Add additional properties for ChatCompletionsOptions

Signed-off-by: Travis Angevine <[email protected]>

* 3 dots, not 2

Signed-off-by: Travis Angevine <[email protected]>

* Can't add docstring to generic spread property

Signed-off-by: Travis Angevine <[email protected]>

* Change unknown parameters to extra parameters

Signed-off-by: Travis Angevine <[email protected]>

* Remove unnecessary rename

Signed-off-by: Travis Angevine <[email protected]>

* Removing api-key change for python, for now

Signed-off-by: Travis Angevine <[email protected]>

* Make operator method internal

Signed-off-by: Travis Angevine <[email protected]>

* Fix pass-through header

Signed-off-by: Travis Angevine <[email protected]>

* Re-enable protocol methods for csharp

Signed-off-by: Travis Angevine <[email protected]>

* Remove "spread" for ChatCompletionsOptions

Signed-off-by: Travis Angevine <[email protected]>

* Remove spread for additionalRequestHeaders

Signed-off-by: Travis Angevine <[email protected]>

* needed commas

Signed-off-by: Travis Angevine <[email protected]>

* another formatting attempt

Signed-off-by: Travis Angevine <[email protected]>

* okay, figured out how the formatting works

Signed-off-by: Travis Angevine <[email protected]>

* Alias breaks the generator

Signed-off-by: Travis Angevine <[email protected]>

* A model won't give us the interaction pattern that we want. Trying this.

Signed-off-by: Travis Angevine <[email protected]>

* Forgot semicolon

Signed-off-by: Travis Angevine <[email protected]>

* Does swapping the order of parameters matter?

Signed-off-by: Travis Angevine <[email protected]>

* Make extraParams optional?

Signed-off-by: Travis Angevine <[email protected]>

* Try and get rid of anonymous model

Signed-off-by: Travis Angevine <[email protected]>

* Try adding RequestHeadersTrait

Signed-off-by: Travis Angevine <[email protected]>

* Maybe needs to be an object?

Signed-off-by: Travis Angevine <[email protected]>

* Add using

Signed-off-by: Travis Angevine <[email protected]>

* Revert to "good" state

Signed-off-by: Travis Angevine <[email protected]>

* Try moving extra parameters. Change Parameters back to unknown

Signed-off-by: Travis Angevine <[email protected]>

* Skip the alias

Signed-off-by: Travis Angevine <[email protected]>

* Is it the header which is causing issues?

Signed-off-by: Travis Angevine <[email protected]>

* Headers in the options object seems to not work

Signed-off-by: Travis Angevine <[email protected]>

* Remove commented operation

Signed-off-by: Travis Angevine <[email protected]>

* Unnecessary using

Signed-off-by: Travis Angevine <[email protected]>

* Add embeddings for csharp

Signed-off-by: Travis Angevine <[email protected]>

* Client changes for C#

Signed-off-by: Travis Angevine <[email protected]>

* Need the options objects to be models

Signed-off-by: Travis Angevine <[email protected]>

* Make the embedding methods public for now, for intial testing

Signed-off-by: Travis Angevine <[email protected]>

* Remove image embedding for now until it can be tested

Signed-off-by: Travis Angevine <[email protected]>

* Add new streaming classes for C#

Signed-off-by: Travis Angevine <[email protected]>

* Revert to Darren's branch to test

Signed-off-by: trangevi <[email protected]>

* Explicitly set the completions options object to be an input

Signed-off-by: trangevi <[email protected]>

* Other clients with spread parameters

Signed-off-by: trangevi <[email protected]>

* No image embedding client yet, so leave this out for now

Signed-off-by: trangevi <[email protected]>

* Operations need to be internal for all languages

Signed-off-by: trangevi <[email protected]>

* Comment

Signed-off-by: trangevi <[email protected]>

* Add support for structured outputs

Signed-off-by: trangevi <[email protected]>

* We already had the property, just need to add one more option

Signed-off-by: trangevi <[email protected]>

* Remove unnecessary inner class

Signed-off-by: trangevi <[email protected]>

* Rename

Signed-off-by: trangevi <[email protected]>

* extra semicolon

Signed-off-by: trangevi <[email protected]>

* Fix naming

Signed-off-by: trangevi <[email protected]>

* What if it's just unknown?

Signed-off-by: trangevi <[email protected]>

* unknown to record unknown

Signed-off-by: trangevi <[email protected]>

* Leave as unknown for now

Signed-off-by: trangevi <[email protected]>

* Add image embeddings client back to csharp

Signed-off-by: trangevi <[email protected]>

* Generation is fixed, switch back to record

Signed-off-by: trangevi <[email protected]>

* Make ImageEmbeddingsOptions explicitly an input

Signed-off-by: trangevi <[email protected]>

* First attempt. Make the main content item a parent of the two relevant ones, will require a custom factory

Signed-off-by: trangevi <[email protected]>

* Do I need this explicitly public?

Signed-off-by: trangevi <[email protected]>

* What about usage?

Signed-off-by: trangevi <[email protected]>

* More inputs

Signed-off-by: trangevi <[email protected]>

* Remove middle layer

Signed-off-by: trangevi <[email protected]>

* Missed some

Signed-off-by: trangevi <[email protected]>

* TSP formatting and swagger changes

Signed-off-by: trangevi <[email protected]>

* Another format change

Signed-off-by: trangevi <[email protected]>

* Update with some changes to better reflect the desired merge

Signed-off-by: trangevi <[email protected]>

* Mark options object as internal to address transitive access issue

Signed-off-by: trangevi <[email protected]>

* review comments

Signed-off-by: trangevi <[email protected]>

* Add renaming for python classes

Signed-off-by: trangevi <[email protected]>

* Update after npx command

Signed-off-by: trangevi <[email protected]>

---------

Signed-off-by: Travis Angevine <[email protected]>
Signed-off-by: trangevi <[email protected]>

---------

Signed-off-by: trangevi <[email protected]>
Signed-off-by: Travis Angevine <[email protected]>
Co-authored-by: Darren Cohen <[email protected]>

* PR fixes

Signed-off-by: trangevi <[email protected]>

* Add package flavor for tsp compiler

Signed-off-by: trangevi <[email protected]>

* Replace removed cspell file

Signed-off-by: trangevi <[email protected]>

---------

Signed-off-by: trangevi <[email protected]>
Signed-off-by: Travis Angevine <[email protected]>
Co-authored-by: Glenn Harper <[email protected]>
Co-authored-by: Glenn Harper <[email protected]>
Co-authored-by: Darren Cohen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data-plane TypeSpec Authored with TypeSpec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants