mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
Enhance chat responses and update package versions
Updated `ChatService.cs` to improve user guidance for unavailable information responses. Added multiple phrases to ensure clarity and context relevance. Modified `SqlDatabaseVectorSearch.csproj` to upgrade `Microsoft.SemanticKernel` from `1.45.0` to `1.47.0`, and incremented versions for `Swashbuckle.AspNetCore.SwaggerUI` and `TinyHelpers.AspNetCore` to `8.1.1` and `4.0.25`, respectively, for bug fixes and improvements.
This commit is contained in:
@@ -114,7 +114,13 @@ public class ChatService(IChatCompletionService chatCompletionService, Tokenizer
|
|||||||
{
|
{
|
||||||
var chat = new ChatHistory("""
|
var chat = new ChatHistory("""
|
||||||
You can use only the information provided in this chat to answer questions. If you don't know the answer, reply suggesting to refine the question.
|
You can use only the information provided in this chat to answer questions. If you don't know the answer, reply suggesting to refine the question.
|
||||||
For example, if the user asks "What is the capital of France?" and in this chat there isn't information about France, you should reply something like "This information isn't available in the given context".
|
For example, if the user asks "What is the capital of France?" and in this chat there isn't information about France, you should reply something like:
|
||||||
|
- This information isn't available in the given context
|
||||||
|
- I'm sorry, I don't know the answer to that question
|
||||||
|
- I don't have that information
|
||||||
|
- I don't know
|
||||||
|
- Given the context, I can't answer that question
|
||||||
|
- I'my sorry, I don't have enough information to answer that question
|
||||||
Never answer to questions that are not related to this chat.
|
Never answer to questions that are not related to this chat.
|
||||||
You must answer in the same language of the user's question. For example, it the user asks a question in English, the answer must be in English.
|
You must answer in the same language of the user's question. For example, it the user asks a question in English, the answer must be in English.
|
||||||
""");
|
""");
|
||||||
|
|||||||
@@ -23,12 +23,12 @@
|
|||||||
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers.Data.Cl100kBase" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.2" />
|
<PackageReference Include="Microsoft.ML.Tokenizers.Data.O200kBase" Version="1.0.2" />
|
||||||
<PackageReference Include="Microsoft.SemanticKernel" Version="1.45.0" />
|
<PackageReference Include="Microsoft.SemanticKernel" Version="1.47.0" />
|
||||||
<PackageReference Include="MimeMapping" Version="3.1.0" />
|
<PackageReference Include="MimeMapping" Version="3.1.0" />
|
||||||
<PackageReference Include="MinimalHelpers.Routing.Analyzers" Version="1.1.3" />
|
<PackageReference Include="MinimalHelpers.Routing.Analyzers" Version="1.1.3" />
|
||||||
<PackageReference Include="PdfPig" Version="0.1.10" />
|
<PackageReference Include="PdfPig" Version="0.1.10" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="8.1.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="8.1.1" />
|
||||||
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.23" />
|
<PackageReference Include="TinyHelpers.AspNetCore" Version="4.0.25" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user