diff --git a/src/Databases/IntegrationTests/DatabaseTests.cs b/src/Databases/IntegrationTests/DatabaseTests.cs index ed189b26..e4848006 100644 --- a/src/Databases/IntegrationTests/DatabaseTests.cs +++ b/src/Databases/IntegrationTests/DatabaseTests.cs @@ -18,7 +18,7 @@ public async Task CreateAndDeleteCollection_Ok(SupportedDatabase database) var exists = await vectorDatabase.IsCollectionExistsAsync(environment.CollectionName); exists.Should().BeFalse(); - + var collections = await vectorDatabase.ListCollectionsAsync(); collections.Should().BeEmpty(); @@ -34,7 +34,7 @@ await vectorDatabase.Invoking(y => y.GetCollectionAsync(environment.CollectionNa exists = await vectorDatabase.IsCollectionExistsAsync(environment.CollectionName); exists.Should().BeTrue(); - + collections = await vectorDatabase.ListCollectionsAsync(); collections.Should().BeEquivalentTo([environment.CollectionName]); @@ -46,7 +46,7 @@ await vectorDatabase.Invoking(y => y.GetCollectionAsync(environment.CollectionNa exists = await vectorDatabase.IsCollectionExistsAsync(environment.CollectionName); exists.Should().BeFalse(); - + collections = await vectorDatabase.ListCollectionsAsync(); collections.Should().BeEmpty(); } diff --git a/src/Databases/OpenSearch/src/OpenSearchVectorDatabase.cs b/src/Databases/OpenSearch/src/OpenSearchVectorDatabase.cs index 2fca11ed..c14e5106 100644 --- a/src/Databases/OpenSearch/src/OpenSearchVectorDatabase.cs +++ b/src/Databases/OpenSearch/src/OpenSearchVectorDatabase.cs @@ -51,7 +51,7 @@ public async Task CreateCollectionAsync(string collectionName, int dimensions, C public async Task> ListCollectionsAsync(CancellationToken cancellationToken = default) { var response = await _client.Indices.GetAsync(Indices.AllIndices, ct: cancellationToken).ConfigureAwait(false); - + return response.Indices.Keys .Select(x => x.Name) .Where(x => !x.StartsWith(".", StringComparison.Ordinal)) diff --git a/src/Databases/Postgres/src/PostgresDbClient.cs b/src/Databases/Postgres/src/PostgresDbClient.cs index 21542b58..915a4adb 100644 --- a/src/Databases/Postgres/src/PostgresDbClient.cs +++ b/src/Databases/Postgres/src/PostgresDbClient.cs @@ -92,7 +92,7 @@ public async Task> ListTablesAsync(CancellationToken cance .ToList(); } } - + /// /// Create table for documents with embeddings /// diff --git a/src/Databases/Sqlite/src/SqLiteVectorDatabase.cs b/src/Databases/Sqlite/src/SqLiteVectorDatabase.cs index c88debe9..5d67ebe0 100644 --- a/src/Databases/Sqlite/src/SqLiteVectorDatabase.cs +++ b/src/Databases/Sqlite/src/SqLiteVectorDatabase.cs @@ -106,13 +106,13 @@ public async Task> ListCollectionsAsync(CancellationToken var command = _connection.CreateCommand(); command.CommandText = "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'vectors' AND name NOT LIKE 'sqlite_%';"; var reader = await command.ExecuteReaderAsync(cancellationToken).ConfigureAwait(false); - + var collections = new List(); while (await reader.ReadAsync(cancellationToken).ConfigureAwait(false)) { collections.Add(reader["name"].ToString() ?? string.Empty); } - + return collections; } } \ No newline at end of file diff --git a/src/Providers/Groq/src/GroqChatModel.cs b/src/Providers/Groq/src/GroqChatModel.cs index 84988e24..fb636181 100644 --- a/src/Providers/Groq/src/GroqChatModel.cs +++ b/src/Providers/Groq/src/GroqChatModel.cs @@ -10,7 +10,7 @@ public class GroqChatModel( : ChatModel(id), IChatModel { private GroqProvider Provider { get; } = provider ?? throw new ArgumentNullException(nameof(provider)); - + public override async Task GenerateAsync( ChatRequest request, ChatSettings? settings = null, diff --git a/src/Providers/Groq/src/GroqConfiguration.cs b/src/Providers/Groq/src/GroqConfiguration.cs index b3b30397..d1f86078 100644 --- a/src/Providers/Groq/src/GroqConfiguration.cs +++ b/src/Providers/Groq/src/GroqConfiguration.cs @@ -6,7 +6,7 @@ public class GroqConfiguration public string ApiKey { get; set; } = string.Empty; public string ModelId { get; set; } = string.Empty; public double Temperature { get; set; } = 0.5; - public int MaxTokens { get; set; } = 8192 ; + public int MaxTokens { get; set; } = 8192; public double TopP { get; set; } = 1.0; public string Stop { get; set; } = "NONE"; public int StructuredRetryPolicy { get; set; } = 5; diff --git a/src/Providers/Groq/src/GroqProvider.cs b/src/Providers/Groq/src/GroqProvider.cs index 6d4e2d45..4c9ba732 100644 --- a/src/Providers/Groq/src/GroqProvider.cs +++ b/src/Providers/Groq/src/GroqProvider.cs @@ -3,7 +3,7 @@ public class GroqProvider : Provider { public IGroqClient Api { get; private set; } - + public GroqProvider(GroqClient groqClient) : base(id: GroqConfiguration.SectionName) {