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:
Marco Minerva
2024-11-07 10:03:58 +01:00
parent 5b43031251
commit bcd085e49d
3 changed files with 5 additions and 8 deletions
@@ -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)