Add streaming support and improve JSON serialization

- Updated `Response` record class to allow nullable `Question` and `Answer` properties; moved `StreamState` enum to a new file.
- Added `JsonStringEnumConverter` in `Program.cs` for better enum serialization.
- Corrected terminology in document upload endpoint description.
- Introduced `/api/ask-streaming` endpoint for streaming question responses.
- Added `AskStreamingAsync` method in `VectorSearchService` for handling streaming logic.
- Created `StreamState.cs` to define `StreamState` enum with `Start`, `Append`, and `End` values.
This commit is contained in:
Marco Minerva
2025-01-28 11:00:45 +01:00
parent 44c6193674
commit 1ef2d384ec
4 changed files with 57 additions and 9 deletions
@@ -0,0 +1,8 @@
namespace SqlDatabaseVectorSearch.Models;
public enum StreamState
{
Start,
Append,
End
}