mirror of
https://github.com/marcominerva/SqlDatabaseVectorSearch.git
synced 2026-06-20 12:23:10 +00:00
44c6193674
Updated `Response` record in `Response.cs` to include an optional `StreamState` property, which can be `Start`, `Append`, or `End`. Added a new `StreamState` enum to `Response.cs`. In `ChatService.cs`, added new methods `AskQuestionAsync` and `AskStreamingAsync` to handle asking questions and streaming responses, respectively. Refactored `CreateChatAsync` to return a `ChatHistory` object. In `VectorSearchService.cs`, added a new `AskQuestionAsync` method to handle questions using `ChatService`. Updated `CreateContextAsync` to return a tuple with the reformulated question and chunks. Removed the previous implementation of `AskQuestionAsync` and replaced it with the new method utilizing `ChatService`.
10 lines
200 B
C#
10 lines
200 B
C#
namespace SqlDatabaseVectorSearch.Models;
|
|
|
|
public record class Response(string Question, string Answer, StreamState? StreamState = null);
|
|
|
|
public enum StreamState
|
|
{
|
|
Start,
|
|
Append,
|
|
End
|
|
} |