Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions specification/ai/Azure.AI.Projects/indexes/models.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@ using Azure.Core.Traits;
namespace Azure.AI.Projects;

@doc("Index resource Definition")
@discriminator("indexType")
@discriminator("type")
@Rest.resource("indexes")
model Index {
@doc("Type of index")
indexType: IndexType;
type: IndexType;

...AssetBase;
}

@doc("Azure AI Search Index Definition")
model AzureAISearchIndex extends Index {
@doc("Type of index")
indexType: IndexType.azureSearch;
type: IndexType.azureSearch;

@doc("Connection id to Azure AI Search")
connectionId: string;
@doc("Name of connection to Azure AI Search")
connectionName: string;

@doc("Name of index in Azure AI Search resource to attach")
indexName: string;
Expand All @@ -39,7 +39,7 @@ model AzureAISearchIndex extends Index {
@doc("Managed Azure AI Search Index Definition")
model ManagedAzureAISearchIndex extends Index {
@doc("Type of index")
indexType: IndexType.managedAzureSearch;
type: IndexType.managedAzureSearch;

@doc("Vector store id of managed index")
vectorStoreId: string;
Expand All @@ -48,10 +48,10 @@ model ManagedAzureAISearchIndex extends Index {
@doc("CosmosDB Vector Store Index Definition")
model CosmosDBIndex extends Index {
@doc("Type of index")
indexType: IndexType.cosmosDB;
type: IndexType.cosmosDB;

@doc("Connection id to CosmosDB")
connectionId: string;
@doc("Name of connection to CosmosDB")
connectionName: string;

@doc("Name of the CosmosDB Database")
databaseName: string;
Expand All @@ -65,11 +65,8 @@ model CosmosDBIndex extends Index {

@doc("Embedding configuration class")
model EmbeddingConfiguration {
@doc("Connection id to embedding model")
connectionId?: string;

@doc("Deployment name of embedding model")
deploymentName: string;
@doc("Deployment name of embedding model. It can point to a model deployment either in the parent AIServices or a connection.")
modelDeploymentName: string;

@doc("Embedding field")
embeddingField: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9524,17 +9524,17 @@
"type": "object",
"description": "Azure AI Search Index Definition",
"properties": {
"connectionId": {
"connectionName": {
"type": "string",
"description": "Connection id to Azure AI Search"
"description": "Name of connection to Azure AI Search"
},
"indexName": {
"type": "string",
"description": "Name of index in Azure AI Search resource to attach"
}
},
"required": [
"connectionId",
"connectionName",
"indexName"
],
"allOf": [
Expand Down Expand Up @@ -9674,9 +9674,9 @@
"type": "object",
"description": "CosmosDB Vector Store Index Definition",
"properties": {
"connectionId": {
"connectionName": {
"type": "string",
"description": "Connection id to CosmosDB"
"description": "Name of connection to CosmosDB"
},
"databaseName": {
"type": "string",
Expand All @@ -9692,7 +9692,7 @@
}
},
"required": [
"connectionId",
"connectionName",
"databaseName",
"containerName",
"embeddingConfiguration"
Expand Down Expand Up @@ -9903,21 +9903,17 @@
"type": "object",
"description": "Embedding configuration class",
"properties": {
"connectionId": {
"type": "string",
"description": "Connection id to embedding model"
},
"deploymentName": {
"modelDeploymentName": {
"type": "string",
"description": "Deployment name of embedding model"
"description": "Deployment name of embedding model. It can point to a model deployment either in the parent AIServices or a connection."
},
"embeddingField": {
"type": "string",
"description": "Embedding field"
}
},
"required": [
"deploymentName",
"modelDeploymentName",
"embeddingField"
]
},
Expand Down Expand Up @@ -10089,7 +10085,7 @@
"type": "object",
"description": "Index resource Definition",
"properties": {
"indexType": {
"type": {
"$ref": "#/definitions/IndexType",
"description": "Type of index"
},
Expand Down Expand Up @@ -10134,9 +10130,9 @@
"readOnly": true
}
},
"discriminator": "indexType",
"discriminator": "type",
"required": [
"indexType",
"type",
"name",
"version"
]
Expand Down
Loading