Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Embedding generators implementing the `Microsoft.Extensions.AI` abstractions are

```csharp
using Microsoft.Extensions.AI;
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using OpenAI;
using Qdrant.Client;

Expand All @@ -78,7 +78,7 @@ Embedding generators implementing the `Microsoft.Extensions.AI` abstractions are

```csharp
using Microsoft.Extensions.AI;
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using OpenAI;
using Qdrant.Client;

Expand All @@ -103,7 +103,7 @@ Embedding generators implementing the `Microsoft.Extensions.AI` abstractions are
```csharp
using Microsoft.Extensions.AI;
using Microsoft.Extensions.VectorData;
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using OpenAI;
using Qdrant.Client;

Expand Down Expand Up @@ -155,7 +155,6 @@ Embedding generators implementing the `Microsoft.Extensions.AI` abstractions are
The following example demonstrates how to use the embedding generator to automatically generate vectors during both upsert and search operations. This approach simplifies workflows by eliminating the need to precompute embeddings manually.

```csharp

// The data model
internal class FinanceInfo
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ The rest of these instructions will assume that you are using this container usi

## Create your project

Create a new project and add nuget package references for the Redis connector from Semantic Kernel, the open xml package to read the word
Create a new project and add NuGet package references for the Redis connector, the open xml package to read the word
document with and the OpenAI connector from Semantic Kernel for generating embeddings.

```dotnetcli
dotnet new console --framework net8.0 --name SKVectorIngest
cd SKVectorIngest
dotnet add package Microsoft.SemanticKernel.Connectors.AzureOpenAI
dotnet add package Microsoft.SemanticKernel.Connectors.Redis --prerelease
dotnet add package CommunityToolkit.VectorData.Redis
dotnet add package DocumentFormat.OpenXml
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Only connectors for databases that currently support vector plus keyword hybrid
Assuming you have a collection that already contains data, you can easily do a hybrid search on it. Here is an example using Qdrant.

```csharp
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using Microsoft.Extensions.VectorData;
using Qdrant.Client;

Expand Down Expand Up @@ -150,7 +150,7 @@ If no `AdditionalProperty` is provided and the data model contains only one full
If the data model contains no full text search property or multiple full text search properties and `AdditionalProperty` is not provided, the search method will throw.

```csharp
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using Microsoft.Extensions.VectorData;
using Qdrant.Client;

Expand Down
4 changes: 2 additions & 2 deletions semantic-kernel/concepts/vector-store-connectors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ Once you have defined your data model, the next step is to create a VectorStore
In this example, we'll use Qdrant. You will therefore need to import the Qdrant nuget package.

```dotnetcli
dotnet add package Microsoft.SemanticKernel.Connectors.Qdrant --prerelease
dotnet add package CommunityToolkit.VectorData.Qdrant
```

If you want to run Qdrant locally using Docker, use the following command to start the Qdrant container
Expand All @@ -275,7 +275,7 @@ Since databases support many different types of keys and records, we allow you t
In our case, the type of record will be the `Hotel` class we already defined, and the type of key will be `ulong`, since the `HotelId` property is a `ulong` and Qdrant only supports `Guid` or `ulong` keys.

```csharp
using Microsoft.SemanticKernel.Connectors.Qdrant;
using CommunityToolkit.VectorData.Qdrant;
using Qdrant.Client;

// Create a Qdrant VectorStore object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ Notable Azure AI Search connector functionality limitations.
Add the Azure AI Search Vector Store connector NuGet package to your project.

```dotnetcli
dotnet add package Microsoft.SemanticKernel.Connectors.AzureAISearch --prerelease
dotnet add package CommunityToolkit.VectorData.AzureAISearch
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Azure;
Expand All @@ -120,7 +120,6 @@ kernelBuilder.Services
```csharp
using Azure;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand Down Expand Up @@ -148,7 +147,6 @@ kernelBuilder.Services.AddAzureAISearchVectorStore();
using Azure;
using Azure.Search.Documents.Indexes;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand All @@ -164,7 +162,7 @@ You can construct an Azure AI Search Vector Store instance directly.
```csharp
using Azure;
using Azure.Search.Documents.Indexes;
using Microsoft.SemanticKernel.Connectors.AzureAISearch;
using CommunityToolkit.VectorData.AzureAISearch;

var vectorStore = new AzureAISearchVectorStore(
new SearchIndexClient(
Expand All @@ -177,7 +175,7 @@ It is possible to construct a direct reference to a named collection.
```csharp
using Azure;
using Azure.Search.Documents.Indexes;
using Microsoft.SemanticKernel.Connectors.AzureAISearch;
using CommunityToolkit.VectorData.AzureAISearch;

var collection = new AzureAISearchCollection<string, Hotel>(
new SearchIndexClient(new Uri(azureAISearchUri), new AzureKeyCredential(secret)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ This connector is compatible with Azure Cosmos DB MongoDB (vCore) and is *not* d
Add the Azure CosmosDB MongoDB Vector Store connector NuGet package to your project.

```dotnetcli
dotnet add package Microsoft.SemanticKernel.Connectors.CosmosMongoDB --prerelease
dotnet add package CommunityToolkit.VectorData.CosmosMongoDB
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -100,7 +100,6 @@ kernelBuilder.Services

```csharp
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand All @@ -127,7 +126,6 @@ kernelBuilder.Services.AddCosmosMongoVectorStore();

```csharp
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;
using MongoDB.Driver;

// Using IServiceCollection with ASP.NET Core.
Expand All @@ -144,7 +142,7 @@ builder.Services.AddCosmosMongoVectorStore();
You can construct an Azure CosmosDB MongoDB Vector Store instance directly.

```csharp
using Microsoft.SemanticKernel.Connectors.CosmosMongoDB;
using CommunityToolkit.VectorData.CosmosMongoDB;
using MongoDB.Driver;

var mongoClient = new MongoClient(connectionString);
Expand All @@ -155,7 +153,7 @@ var vectorStore = new CosmosMongoVectorStore(database);
It is possible to construct a direct reference to a named collection.

```csharp
using Microsoft.SemanticKernel.Connectors.CosmosMongoDB;
using CommunityToolkit.VectorData.CosmosMongoDB;
using MongoDB.Driver;

var mongoClient = new MongoClient(connectionString);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ var cosmosClient = new CosmosClient(connectionString, new CosmosClientOptions()
Add the Azure CosmosDB NoSQL Vector Store connector NuGet package to your project.

```dotnetcli
dotnet add package Microsoft.SemanticKernel.Connectors.CosmosNoSql --prerelease
dotnet add package CommunityToolkit.VectorData.CosmosNoSql
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -84,7 +84,6 @@ kernelBuilder.Services

```csharp
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand Down Expand Up @@ -120,7 +119,6 @@ kernelBuilder.Services.AddCosmosNoSqlVectorStore();
using System.Text.Json;
using Microsoft.Azure.Cosmos;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand All @@ -144,7 +142,7 @@ You can construct an Azure CosmosDB NoSQL Vector Store instance directly.
```csharp
using System.Text.Json;
using Microsoft.Azure.Cosmos;
using Microsoft.SemanticKernel.Connectors.CosmosNoSql;
using CommunityToolkit.VectorData.CosmosNoSql;

var cosmosClient = new CosmosClient(connectionString, new CosmosClientOptions()
{
Expand All @@ -162,7 +160,7 @@ It is possible to construct a direct reference to a named collection.
```csharp
using System.Text.Json;
using Microsoft.Azure.Cosmos;
using Microsoft.SemanticKernel.Connectors.CosmosNoSql;
using CommunityToolkit.VectorData.CosmosNoSql;

var cosmosClient = new CosmosClient(connectionString, new CosmosClientOptions()
{
Expand Down Expand Up @@ -192,7 +190,7 @@ must be passed to the `CosmosNoSqlCollection` on construction.
```csharp
using System.Text.Json;
using Microsoft.Azure.Cosmos;
using Microsoft.SemanticKernel.Connectors.CosmosNoSql;
using CommunityToolkit.VectorData.CosmosNoSql;

var jsonSerializerOptions = new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.SnakeCaseUpper };

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Add the Couchbase Vector Store connector NuGet package to your project.
dotnet add package CouchbaseConnector.SemanticKernel --prerelease
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Microsoft.SemanticKernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Add the Elasticsearch Vector Store connector NuGet package to your project.
dotnet add package Elastic.SemanticKernel.Connectors.Elasticsearch --prerelease
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Microsoft.SemanticKernel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ The connector has the following characteristics.
Add the Semantic Kernel Core nuget package to your project.

```dotnetcli
dotnet add package Microsoft.SemanticKernel.Connectors.InMemory --prerelease
dotnet add package CommunityToolkit.VectorData.InMemory
```

You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel.
You can add the vector store to the dependency injection container available on the `KernelBuilder` or to the `IServiceCollection` dependency injection container using extension methods provided by the connector package.

```csharp
using Microsoft.Extensions.DependencyInjection;
Expand All @@ -76,7 +76,6 @@ kernelBuilder.Services

```csharp
using Microsoft.Extensions.DependencyInjection;
using Microsoft.SemanticKernel;

// Using IServiceCollection with ASP.NET Core.
var builder = WebApplication.CreateBuilder(args);
Expand All @@ -86,15 +85,15 @@ builder.Services.AddInMemoryVectorStore();
You can construct an InMemory Vector Store instance directly.

```csharp
using Microsoft.SemanticKernel.Connectors.InMemory;
using CommunityToolkit.VectorData.InMemory;

var vectorStore = new InMemoryVectorStore();
```

It is possible to construct a direct reference to a named collection.

```csharp
using Microsoft.SemanticKernel.Connectors.InMemory;
using CommunityToolkit.VectorData.InMemory;

var collection = new InMemoryCollection<string, Hotel>("skhotels");
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Add the Oracle Database Vector Store connector NuGet package to your project.
dotnet add package Oracle.VectorData --prerelease
```

You can add the vector store to the `IServiceCollection` dependency injection container using extension methods provided by Semantic Kernel. In this case, an instance of the `Oracle.VectorData.OracleVectorStore` class also gets registered with the container.
You can add the vector store to the `IServiceCollection` dependency injection container using extension methods provided by the connector package. In this case, an instance of the `Oracle.VectorData.OracleVectorStore` class also gets registered with the container.

```csharp
using Microsoft.SemanticKernel;
Expand Down
Loading