Update libraries

This commit is contained in:
Marco Minerva
2024-06-24 09:45:05 +02:00
parent c72ed3054b
commit 7a97000c10
4 changed files with 6 additions and 6 deletions
@@ -74,7 +74,7 @@ public class VectorSearchService(ApplicationDbContext dbContext, ITextEmbeddingG
var chunks = await dbContext.DocumentChunks var chunks = await dbContext.DocumentChunks
.OrderBy(c => EF.Functions.VectorDistance("cosine", c.Embedding, questionEmbedding.ToArray())) .OrderBy(c => EF.Functions.VectorDistance("cosine", c.Embedding, questionEmbedding.ToArray()))
.Take(appSettings.MaxChunksCount) .Take(appSettings.MaxRelevantChunks)
.ToListAsync(); .ToListAsync();
var answer = await chatService.AskQuestionAsync(question.ConversationId, chunks, reformulatedQuestion); var answer = await chatService.AskQuestionAsync(question.ConversationId, chunks, reformulatedQuestion);
@@ -8,7 +8,7 @@ public class AppSettings
public int OverlapTokens { get; init; } = 100; public int OverlapTokens { get; init; } = 100;
public int MaxChunksCount { get; init; } = 5; public int MaxRelevantChunks { get; init; } = 6;
public int MessageLimit { get; init; } public int MessageLimit { get; init; }
@@ -12,12 +12,12 @@
<PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.2" /> <PackageReference Include="EntityFrameworkCore.Exceptions.SqlServer" Version="8.1.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" 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="MinimalHelpers.OpenApi" Version="2.0.8" />
<PackageReference Include="PdfPig" Version="0.1.8" /> <PackageReference Include="PdfPig" Version="0.1.8" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
<PackageReference Include="TinyHelpers" Version="3.1.5" /> <PackageReference Include="TinyHelpers" Version="3.1.7" />
<PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.4" /> <PackageReference Include="TinyHelpers.AspNetCore" Version="3.1.6" />
</ItemGroup> </ItemGroup>
</Project> </Project>
+1 -1
View File
@@ -18,7 +18,7 @@
"MaxTokenPerLine": 300, "MaxTokenPerLine": 300,
"MaxTokensPerParagraph": 1024, "MaxTokensPerParagraph": 1024,
"OverlapTokens": 100, "OverlapTokens": 100,
"MaxChunksCount": 5, "MaxRelevantChunks": 5,
"MessageLimit": 20, "MessageLimit": 20,
"MessageExpiration": "00:05:00" "MessageExpiration": "00:05:00"
}, },