Update README and refine prompt logic in ChatService

Updated README.md to include a note on Vector support in Azure SQL Database and corrected "Dimension" to "Dimensions". Modified ChatService.cs to append separator "---" only once at the end of the prompt.
This commit is contained in:
Marco Minerva
2024-11-07 09:40:20 +01:00
parent 084177346f
commit b9bcb5c9fd
2 changed files with 3 additions and 6 deletions
@@ -44,18 +44,18 @@ public class ChatService(IMemoryCache cache, IChatCompletionService chatCompleti
var prompt = new StringBuilder("""
Using the following information:
---
""");
// TODO: Ensure that chunks are not too long, according to the model max token.
foreach (var text in chunks)
{
prompt.Append(text);
prompt.AppendLine("---");
prompt.Append(text);
}
prompt.AppendLine($"""
=====
Answer the following question:
---
{question}