Skip to content

Commit

Permalink
Regenerate with 2024-03-01-Preview spec
Browse files Browse the repository at this point in the history
  • Loading branch information
dgetu committed Mar 17, 2024
1 parent f27fc79 commit b2c22d9
Show file tree
Hide file tree
Showing 32 changed files with 769 additions and 137 deletions.
27 changes: 27 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,33 @@
"filename": "sdk/notificationhubs/notification-hubs/review/notification-hubs.api.md",
"words": ["fcmv"]
},
{
"filename": "sdk/search/search-documents/review/**/*.md",
"words": [
"Adls",
"Bokmaal",
"Decompounder",
"Phonetik",
"Piqd",
"Rslp",
"Sorani",
"Vectorizable",
"adlsgen",
"bangla",
"beider",
"haase",
"koelner",
"kstem",
"lovins",
"nysiis",
"odatatype",
"rerank",
"reranker",
"sorani",
"vectorizer",
"vectorizers"
]
},
{
"filename": "sdk/search/search-documents/review/**/*.md",
"words": [
Expand Down
6 changes: 6 additions & 0 deletions sdk/search/search-documents/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@

### Features Added

- Add vector compression [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
- Service-side scalar quantization of your vector data
- Optional reranking with full-precision vectors
- Optional oversampling of documents when reranking compressed vectors
- Add `Edm.Half`, `Edm.Int16`, and `Edm.SByte` vector spaces [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
- Add non-persistent vector usage through `SimpleField.stored` [#28772](https://github.com/Azure/azure-sdk-for-js/pull/28772)
- Expose the internal HTTP pipeline to allow users to send raw requests with it

## 12.0.0-beta.4 (2023-10-11)
Expand Down
2 changes: 1 addition & 1 deletion sdk/search/search-documents/assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "js",
"TagPrefix": "js/search/search-documents",
"Tag": "js/search/search-documents_32f6e93063"
"Tag": "js/search/search-documents_b75f2ec5af"
}
4 changes: 0 additions & 4 deletions sdk/search/search-documents/openai-patch.diff

This file was deleted.

44 changes: 43 additions & 1 deletion sdk/search/search-documents/review/search-documents.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ export interface BaseVectorQuery<TModel extends object> {
fields?: SearchFieldArray<TModel>;
kind: VectorQueryKind;
kNearestNeighborsCount?: number;
oversampling?: number;
}

// @public
Expand All @@ -230,6 +231,14 @@ export interface BaseVectorSearchAlgorithmConfiguration {
name: string;
}

// @public
export interface BaseVectorSearchCompressionConfiguration {
defaultOversampling?: number;
kind: "scalarQuantization";
name: string;
rerankWithOriginalVectors?: boolean;
}

// @public
export interface BaseVectorSearchVectorizer {
kind: VectorSearchVectorizerKind;
Expand Down Expand Up @@ -1910,6 +1919,16 @@ export enum KnownVectorQueryKind {
Vector = "vector"
}

// @public
export enum KnownVectorSearchCompressionKind {
ScalarQuantization = "scalarQuantization"
}

// @public
export enum KnownVectorSearchCompressionTargetDataType {
Int8 = "int8"
}

// @public
export enum KnownVectorSearchVectorizerKind {
AzureOpenAI = "azureOpenAI",
Expand Down Expand Up @@ -2252,6 +2271,17 @@ export interface ResourceCounter {
// @public
export type RunIndexerOptions = OperationOptions;

// @public
export interface ScalarQuantizationCompressionConfiguration extends BaseVectorSearchCompressionConfiguration {
kind: "scalarQuantization";
parameters?: ScalarQuantizationParameters;
}

// @public
export interface ScalarQuantizationParameters {
quantizedDataType?: VectorSearchCompressionTargetDataType;
}

// @public
export type ScoringFunction = DistanceScoringFunction | FreshnessScoringFunction | MagnitudeScoringFunction | TagScoringFunction;

Expand Down Expand Up @@ -2339,7 +2369,7 @@ export type SearchField = SimpleField | ComplexField;
export type SearchFieldArray<TModel extends object = object> = (<T>() => T extends TModel ? true : false) extends <T>() => T extends object ? true : false ? readonly string[] : readonly SelectFields<TModel>[];

// @public
export type SearchFieldDataType = "Edm.String" | "Edm.Int32" | "Edm.Int64" | "Edm.Double" | "Edm.Boolean" | "Edm.DateTimeOffset" | "Edm.GeographyPoint" | "Collection(Edm.String)" | "Collection(Edm.Int32)" | "Collection(Edm.Int64)" | "Collection(Edm.Double)" | "Collection(Edm.Boolean)" | "Collection(Edm.DateTimeOffset)" | "Collection(Edm.GeographyPoint)" | "Collection(Edm.Single)";
export type SearchFieldDataType = "Edm.String" | "Edm.Int32" | "Edm.Int64" | "Edm.Double" | "Edm.Boolean" | "Edm.DateTimeOffset" | "Edm.GeographyPoint" | "Collection(Edm.String)" | "Collection(Edm.Int32)" | "Collection(Edm.Int64)" | "Collection(Edm.Double)" | "Collection(Edm.Boolean)" | "Collection(Edm.DateTimeOffset)" | "Collection(Edm.GeographyPoint)" | "Collection(Edm.Single)" | "Collection(Edm.Half)" | "Collection(Edm.Int16)" | "Collection(Edm.SByte)";

// @public
export interface SearchIndex {
Expand Down Expand Up @@ -2881,6 +2911,7 @@ export interface SimpleField {
searchable?: boolean;
searchAnalyzerName?: LexicalAnalyzerName;
sortable?: boolean;
stored?: boolean;
synonymMapNames?: string[];
type: SearchFieldDataType;
vectorSearchDimensions?: number;
Expand Down Expand Up @@ -3091,6 +3122,7 @@ export type VectorQueryKind = "vector" | "text";
// @public
export interface VectorSearch {
algorithms?: VectorSearchAlgorithmConfiguration[];
compressions?: VectorSearchCompressionConfiguration[];
profiles?: VectorSearchProfile[];
vectorizers?: VectorSearchVectorizer[];
}
Expand All @@ -3104,6 +3136,15 @@ export type VectorSearchAlgorithmKind = "hnsw" | "exhaustiveKnn";
// @public (undocumented)
export type VectorSearchAlgorithmMetric = "cosine" | "euclidean" | "dotProduct";

// @public
export type VectorSearchCompressionConfiguration = ScalarQuantizationCompressionConfiguration;

// @public
export type VectorSearchCompressionKind = string;

// @public
export type VectorSearchCompressionTargetDataType = string;

// @public
export interface VectorSearchOptions<TModel extends object> {
filterMode?: VectorFilterMode;
Expand All @@ -3113,6 +3154,7 @@ export interface VectorSearchOptions<TModel extends object> {
// @public
export interface VectorSearchProfile {
algorithmConfigurationName: string;
compressionConfigurationName?: string;
name: string;
vectorizer?: string;
}
Expand Down
54 changes: 54 additions & 0 deletions sdk/search/search-documents/src/errorModels.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

/**
* Common error response for all Azure Resource Manager APIs to return error details for failed
* operations. (This also follows the OData error response format.).
*/
export interface ErrorResponse {
/** The error object. */
error?: ErrorDetail;
}

/** The error detail. */
export interface ErrorDetail {
/**
* The error code.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly code?: string;
/**
* The error message.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly message?: string;
/**
* The error target.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly target?: string;
/**
* The error details.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly details?: ErrorDetail[];
/**
* The error additional info.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly additionalInfo?: ErrorAdditionalInfo[];
}

/** The resource management error additional info. */
export interface ErrorAdditionalInfo {
/**
* The additional info type.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly type?: string;
/**
* The additional info.
* NOTE: This property will not be serialized. It can only be populated by the server.
*/
readonly info?: Record<string, unknown>;
}
62 changes: 47 additions & 15 deletions sdk/search/search-documents/src/generated/data/models/index.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b2c22d9

Please sign in to comment.