mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Update libraries
This commit is contained in:
@@ -74,7 +74,7 @@ public class VectorSearchService(ApplicationDbContext dbContext, ITextEmbeddingG
|
||||
|
||||
var chunks = await dbContext.DocumentChunks
|
||||
.OrderBy(c => EF.Functions.VectorDistance("cosine", c.Embedding, questionEmbedding.ToArray()))
|
||||
.Take(appSettings.MaxChunksCount)
|
||||
.Take(appSettings.MaxRelevantChunks)
|
||||
.ToListAsync();
|
||||
|
||||
var answer = await chatService.AskQuestionAsync(question.ConversationId, chunks, reformulatedQuestion);
|
||||
|
||||
@@ -8,7 +8,7 @@ public class AppSettings
|
||||
|
||||
public int OverlapTokens { get; init; } = 100;
|
||||
|
||||
public int MaxChunksCount { get; init; } = 5;
|
||||
public int MaxRelevantChunks { get; init; } = 6;
|
||||
|
||||
public int MessageLimit { get; init; }
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@
|
||||
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.2" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.14.1" />
|
||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.15.0" />
|
||||
<PackageReference Include="MinimalHelpers.OpenApi" Version="2.0.8" />
|
||||
<PackageReference Include="PdfPig" Version="0.1.8" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||
<PackageReference Include="TinyHelpers" Version="3.1.5" />
|
||||
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.4" />
|
||||
<PackageReference Include="TinyHelpers" Version="3.1.7" />
|
||||
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.6" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"MaxTokenPerLine": 300,
|
||||
"MaxTokensPerParagraph": 1024,
|
||||
"OverlapTokens": 100,
|
||||
"MaxChunksCount": 5,
|
||||
"MaxRelevantChunks": 5,
|
||||
"MessageLimit": 20,
|
||||
"MessageExpiration": "00:05:00"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user