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
[Search] Regenerate with 2024-05-01-preview spec #29594
Conversation
685b434
to
9404701
Compare
9404701
to
274bcba
Compare
API change check APIView has identified API level changes in this PR and created following API reviews. |
274bcba
to
309d00e
Compare
dd2d3e6
to
20de322
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Havent finished reviewing yet but figured I'll share whatever comments I spotted already. Will continue after my morning meeting 👍
|
||
### Breaking Changes | ||
|
||
- Fixed an incorrect enum variant in `KnownVectorQueryKind` [#29601](https://github.com/Azure/azure-sdk-for-js/pull/29601) | ||
|
||
### Features Added |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
@@ -15,6 +15,23 @@ import { Pipeline } from '@azure/core-rest-pipeline'; | |||
import { RestError } from '@azure/core-rest-pipeline'; | |||
import { TokenCredential } from '@azure/core-auth'; | |||
|
|||
// @public | |||
export interface AIServicesVisionParameters { | |||
apiKey?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you tell me more about this? I see both apiKey
and authIdentity
here and I wonder what scenarios do we have where both are provided?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that exactly one of these should be set - one uses a key credential where the other uses managed identity. There's an authored convenience pattern elsewhere in this APIView where a discriminated union is used to enforce such constraints at compile time. This is how it's generated, with every auth kind exposed as optional properties. I've opted to maintain consistency with the rest of the package here, and only implement the convenience with AMLParameters because it's called out explicitly in the documentation there.
20de322
to
590d5a8
Compare
590d5a8
to
e7c2614
Compare
7e290aa
to
ca94b57
Compare
@@ -994,3 +1027,26 @@ export interface VectorSearchOptions<TModel extends object> { | |||
*/ | |||
filterMode?: VectorFilterMode; | |||
} | |||
/** The threshold used for vector queries. */ | |||
export interface BaseVectorThreshold { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this base is needed or does anything, does it? If you remove it (and the two interfaces below no longer extend this) does anything change or break?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a rename of a generated type. I'll open an issue to update all such types to be emitted as Autorest transforms.
export interface KeyAuthAzureMachineLearningVectorizerParameters extends BaseAzureMachineLearningVectorizerParameters { | ||
authenticationKey: string; | ||
// (undocumented) | ||
authKind: "key"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Maor will chat with other architects about using classes instead of discriminated unions (not blocking)
if (!vectorQuery) { | ||
return vectorQuery; | ||
} | ||
private convertVectorQuery<T extends VectorQuery<TModel>>(vectorQuery: T): GeneratedVectorQuery { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: toGenerated / fromGenerated naming conventions + this can be a function. Not blocking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. I'll open an issue tracking migrating all such functions to their own file/namespace as well.
ca94b57
to
1f1271a
Compare
1f1271a
to
f51681a
Compare
/check-enforcer override |
Packages impacted by this PR
@azure/search-documents
Describe the problem that is addressed by this PR
Adds 2024 May preview features.
Designed to be reviewed on a per-commit basis.
Depends on #29595
Are there test cases added in this PR? (If not, why?)
Tests are currently failing locally.
Checklists