Skip to content

Commit

Permalink
Fixes based on merge from main
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrostruk committed Oct 15, 2024
1 parent 1b75ccd commit 44e366f
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ IVectorStoreRecordCollection<TKey, TRecord> CreateVectorStoreRecordCollection<TK
DbConnection connection,
string name,
VectorStoreRecordDefinition? vectorStoreRecordDefinition)
where TKey : notnull
where TRecord : class;
where TKey : notnull;
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ public static IKernelBuilder AddSqliteVectorStoreRecordCollection<TKey, TRecord>
SqliteVectorStoreRecordCollectionOptions<TRecord>? options = default,
string? serviceId = default)
where TKey : notnull
where TRecord : class
{
builder.Services.AddSqliteVectorStoreRecordCollection<TKey, TRecord>(collectionName, options, serviceId);
return builder;
Expand All @@ -87,7 +86,6 @@ public static IKernelBuilder AddSqliteVectorStoreRecordCollection<TKey, TRecord>
SqliteVectorStoreRecordCollectionOptions<TRecord>? options = default,
string? serviceId = default)
where TKey : notnull
where TRecord : class
{
builder.Services.AddSqliteVectorStoreRecordCollection<TKey, TRecord>(collectionName, connectionString, options, serviceId);
return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public static IServiceCollection AddSqliteVectorStoreRecordCollection<TKey, TRec
SqliteVectorStoreRecordCollectionOptions<TRecord>? options = default,
string? serviceId = default)
where TKey : notnull
where TRecord : class
{
services.AddKeyedTransient<IVectorStoreRecordCollection<TKey, TRecord>>(
serviceId,
Expand Down Expand Up @@ -120,7 +119,6 @@ public static IServiceCollection AddSqliteVectorStoreRecordCollection<TKey, TRec
SqliteVectorStoreRecordCollectionOptions<TRecord>? options = default,
string? serviceId = default)
where TKey : notnull
where TRecord : class
{
services.AddKeyedTransient<IVectorStoreRecordCollection<TKey, TRecord>>(
serviceId,
Expand Down Expand Up @@ -150,7 +148,6 @@ public static IServiceCollection AddSqliteVectorStoreRecordCollection<TKey, TRec
/// <param name="serviceId">The service id that the registrations should use.</param>
private static void AddVectorizedSearch<TKey, TRecord>(IServiceCollection services, string? serviceId)
where TKey : notnull
where TRecord : class
{
services.AddKeyedTransient<IVectorizedSearch<TRecord>>(
serviceId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public SqliteVectorStore(
/// <inheritdoc />
public IVectorStoreRecordCollection<TKey, TRecord> GetCollection<TKey, TRecord>(string name, VectorStoreRecordDefinition? vectorStoreRecordDefinition = null)
where TKey : notnull
where TRecord : class
{
if (typeof(TKey) != typeof(string) && typeof(TKey) != typeof(ulong))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ namespace Microsoft.SemanticKernel.Connectors.Sqlite;
public sealed class SqliteVectorStoreRecordCollection<TRecord> :
IVectorStoreRecordCollection<ulong, TRecord>,
IVectorStoreRecordCollection<string, TRecord>
where TRecord : class
#pragma warning restore CA1711 // Identifiers should not have incorrect
{
/// <summary>The name of this database for telemetry purposes.</summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace Microsoft.SemanticKernel.Connectors.Sqlite;
/// <summary>
/// Options when creating a <see cref="SqliteVectorStoreRecordCollection{TRecord}"/>.
/// </summary>
public sealed class SqliteVectorStoreRecordCollectionOptions<TRecord> where TRecord : class
public sealed class SqliteVectorStoreRecordCollectionOptions<TRecord>
{
/// <summary>
/// Gets or sets an optional custom mapper to use when converting between the data model and the SQLite record.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace Microsoft.SemanticKernel.Connectors.Sqlite;
/// </summary>
/// <typeparam name="TRecord">The consumer data model to map to or from.</typeparam>
internal sealed class SqliteVectorStoreRecordMapper<TRecord> : IVectorStoreRecordMapper<TRecord, Dictionary<string, object?>>
where TRecord : class
{
/// <summary><see cref="VectorStoreRecordPropertyReader"/> with helpers for reading vector store model properties and their attributes.</summary>
private readonly VectorStoreRecordPropertyReader _propertyReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public SqliteVectorStoreFixture()
public SqliteVectorStoreRecordCollection<TRecord> GetCollection<TRecord>(
string collectionName,
SqliteVectorStoreRecordCollectionOptions<TRecord>? options = default)
where TRecord : class
{
return new SqliteVectorStoreRecordCollection<TRecord>(
this.Connection,
Expand Down

0 comments on commit 44e366f

Please sign in to comment.