mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Update README, adjust prompt formatting, add new package
Updated README.md to include a note on Vector support in Azure SQL Database/Managed Instance (EAP) and corrected "Dimension" to "Dimensions". Adjusted prompt formatting in ChatService.cs by replacing "---" with "=====" and improved text chunk appending. Added new package reference for `Microsoft.ML.Tokenizers.Data.Cl100kBase` in SqlDatabaseVectorSearch.csproj.
This commit is contained in:
@@ -47,9 +47,8 @@ public class ChatService(IMemoryCache cache, IChatCompletionService chatCompleti
|
||||
Answer the following question:
|
||||
---
|
||||
{question}
|
||||
---
|
||||
=====
|
||||
Using the following information:
|
||||
---
|
||||
|
||||
""");
|
||||
|
||||
@@ -59,7 +58,7 @@ public class ChatService(IMemoryCache cache, IChatCompletionService chatCompleti
|
||||
|
||||
foreach (var chunk in chunks)
|
||||
{
|
||||
var text = $"{chunk}---";
|
||||
var text = $"---{Environment.NewLine}{chunk}";
|
||||
|
||||
var tokenCount = tokenizerService.CountTokens(text);
|
||||
if (tokenCount > tokensAvailable)
|
||||
@@ -68,7 +67,7 @@ public class ChatService(IMemoryCache cache, IChatCompletionService chatCompleti
|
||||
break;
|
||||
}
|
||||
|
||||
prompt.AppendLine(text);
|
||||
prompt.Append(text);
|
||||
|
||||
tokensAvailable -= tokenCount;
|
||||
if (tokensAvailable <= 0)
|
||||
|
||||
Reference in New Issue
Block a user