This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
Bot releases are hidden (Show)
Published by azure-sdk 2 months ago
Published by azure-sdk 2 months ago
RequestOptions
. docs
response.correlatedActivityId
.v3
for features up to the v3 release, and v4
for features up to the v4 release.// define vector indexing policy
const vectorEmbeddingPolicy = {
vectorEmbeddings: [
{
path: "/vector1",
dataType: VectorEmbeddingDataType.UInt8,
dimensions: 1000,
distanceFunction: VectorEmbeddingDistanceFunction.Euclidean,
},
{
path: "/vector2",
dataType: VectorEmbeddingDataType.Int8,
dimensions: 200,
distanceFunction: VectorEmbeddingDistanceFunction.DotProduct,
},
{
path: "/vector3",
dataType: VectorEmbeddingDataType.UInt8,
dimensions: 400,
distanceFunction: VectorEmbeddingDistanceFunction.Cosine,
},
],
};
// add vector indexes in Indexing Policy
const indexingPolicy = {
automatic: true,
indexingMode: "consistent",
vectorIndexes: [
{ path: "/vector1", type: VectorIndexType.Flat },
{ path: "/vector2", type: VectorIndexType.QuantizedFlat },
{ path: "/vector3", type: VectorIndexType.DiskANN },
],
};
// define and create container with vector Embedding Policy
const containerDefinition = {
id: containerId,
partitionKey: { paths: ["/id"] },
indexingPolicy: indexingPolicy,
vectorEmbeddingPolicy: vectorEmbeddingPolicy,
};
await database.containers.createIfNotExists(containerDefinition);
allowUnboundedNonStreamingQueries
in query FeedOptions. Also added an internal buffer size check to prevent excessive memory consumption, throwing errors if the buffer size exceeds the default. The max buffer size can be increased using the vectorSearchBufferSize
option from query FeedOptions.ChangeFeedStartFrom.Now
and ChangeFeedStartFrom.Continuation
.changeFeedMode
in changeFeedIteratorOptions: const changeFeedIteratorOptions: ChangeFeedIteratorOptions = {
maxItemCount: 5,
changeFeedStartFrom: ChangeFeedStartFrom.Now(),
changeFeedMode: ChangeFeedMode.AllVersionsAndDeletes,
};
const iterator = container.items.getChangeFeedIterator(changeFeedIteratorOptions);
bypassIntegratedCache
in RequestOptions. const options: RequestOptions = {bypassIntegratedCache: true};
const response = await container.item("1").read(options);
const computedProperties: ComputedProperty[] = [{
name: "lowerLastName",
query:
"SELECT VALUE LOWER(IS_DEFINED(c.lastName) ? c.lastName : c.parents[0].familyName) FROM c",
},];
const { resource: containerdef } = await database.containers.createIfNotExists({
id: containerName,
computedProperties: computedProperties,
indexingPolicy: indexingPolicy,
});
const container: Container = database.container(containerdef.id);
const containerDefinition: ContainerDefinition = {
id: "containerWithCompositeIndexingPolicy",
indexingPolicy: {
automatic: true,
indexingMode: IndexingMode.consistent,
includedPaths: [
{
path: "/*",
},
],
excludedPaths: [],
compositeIndexes: [
[
{ path: "/key", order: "ascending" },
{ path: "/field", order: "ascending" },
],
],
},
};
await database.containers.create(containerDefinition);
HttpClient
when constructing a CosmosClient
.Published by azure-sdk 2 months ago
Published by azure-sdk 2 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Initial release of the Azure Compute Fleet package
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
Published by azure-sdk 3 months ago
The package of @azure/arm-servicefabricmanagedclusters is using our next generation design principles. To learn more, please refer to our documentation Quick Start.
Published by azure-sdk 3 months ago
The package of @azure/arm-redhatopenshift is using our next generation design principles. To learn more, please refer to our documentation Quick Start.
Published by azure-sdk 3 months ago
Compared with version 3.0.0