- Added `await Task.Yield();` to enhance responsiveness in `Ask.razor`.
- Updated the markdown content source from README to `docs.md` in `Home.razor` for more relevant information.
Updated clipboard button to use Button component with Icon.
Added HandleKeyDown event for submitting questions with Enter key.
Modified question handling to support streaming responses.
Refactored CopyToClipboard method to be asynchronous.
Significantly updated `Ask.razor` to improve the chat interface with a new layout for user and assistant messages, added input area for questions, and buttons for submission and reset. Removed the previous count display and introduced asynchronous message handling and a new `Message` class.
Minor change in `Documents.razor` by removing a 2000 ms delay before loading documents.
Updated `Ask.razor.css` with new styles for tooltips, avatars, input fields, card bodies, and progress indicators.
Added or updated `assistant.png` and `user.png` for new avatar images in the chat interface.
Updated the route from "/counter" to "/ask". Changed the page title from "Counter" to "Chat with your data" and modified the heading accordingly. The functionality for displaying the current count and the increment button remains intact.
Updated `MainLayout.razor` to include a GitHub link and modified sidebar navigation. Removed `Counter.razor` and integrated its functionality into `Ask.razor`. Enhanced error handling in `Error.razor` and removed request ID display. Deleted `Weather.razor` and its associated content.
Updated `Error.razor` to provide distinct 404 and 500 error messages with a user-friendly layout, including a home button. Conditionally rendered Request ID display and removed development mode information for a cleaner user experience.
Modified `Program.cs` to change error handling middleware from re-executing the error page to redirecting with error codes, improving error information passed to the error page.
- Added `StateHasChanged()` call after loading documents in `Documents.razor`.
- Introduced `LoadDocumentsAsync` method for document retrieval.
- Updated page title in `Home.razor` and injected `IHttpClientFactory`.
- Implemented loading spinner and markdown fetching in `OnAfterRenderAsync`.
- Configured HTTP client with resilience handler in `Program.cs`.
- Changed `app.css` path in `App.razor`.
- Refactored `Documents.razor` to improve form handling:
- Removed `VectorSearchService` injection; added `IServiceProvider` and `IJSRuntime`.
- Updated header from `<h2>` to `<h4>`.
- Introduced `uploadDocumentRequest` for form state management.
- Modified document ID input for optional GUID with validation.
- Disabled upload button when no file is selected.
- Enhanced document loading logic with scoped service provider.
- Updated deletion logic to handle multiple document IDs.
- Added method in `DocumentService.cs` for bulk document deletion.
- Restructured `app.css` for improved styling and new validation/error message styles.
- Updated `Sidebar2` in `MainLayout.razor` for SQL Vector Search.
- Improved document upload interface in `Documents.razor` with icons and tooltips.
- Adjusted layout to include Document ID input and changed checkbox to `CheckboxInput`.
- Added `documentId` property for handling document uploads.
- Enhanced `SelectableDocument` class with `ContentType` property for better document info.
- Changed the "Documents" icon in `MainLayout.razor`.
- Added a `ConfirmDialog` component in `Documents.razor` for user confirmations.
- Adjusted the capitalization of the creation date column header.
- Restructured the delete button layout for better responsiveness and changed its icon.
- Updated lifecycle method from `OnInitializedAsync` to `OnAfterRenderAsync` for improved document loading.
- Introduced a new asynchronous method for obtaining local date strings.
- Updated toast messages to use the new date formatting method.
- Added a new method for converting UTC dates to local time.
- Introduced a `SelectableDocument` record class to enhance document management.
- Updated README.md for clarity on application features.
- Added using directives and improved service configuration in Program.cs.
- Enhanced error handling and status code management in Program.cs.
- Changed application URL port in launchSettings.json.
- Added package references for Blazor Bootstrap and other libraries.
- Created new HTML structure in App.razor and implemented routing in Routes.razor.
- Updated MainLayout.razor for Blazor Bootstrap layout and sidebar navigation.
- Developed new components: Counter.razor, Documents.razor, Error.razor, Home.razor, and Weather.razor.
- Added utility classes: RequestExtensions.cs and StreamExtensions.cs.
- Updated app.css for custom styles and added favicon.png.
- Created functions.js for local time conversion utility.
Updated README.md to include Markdown file support.
Introduced new endpoint for uploading Markdown documents with MIME type handling.
Removed TextChunkerService and created DefaultTextChunker and MarkdownTextChunker classes implementing ITextChunker.
Updated VectorSearchService to utilize the new chunking interface.
Added MimeMapping package reference in the project file.
- Updated `Microsoft.SemanticKernel` to version `1.37.0`.
- Updated `MinimalHelpers.OpenApi` to version `2.1.4`.
- Updated `TinyHelpers.AspNetCore` to version `4.0.19`.
Upgraded several NuGet packages in `SqlDatabaseVectorSearch.csproj`:
- `Microsoft.AspNetCore.OpenApi` to version `9.0.2`
- `Microsoft.EntityFrameworkCore.SqlServer` to version `9.0.2`
- `Microsoft.Extensions.Caching.Hybrid` to version `9.2.0-preview.1.25105.6`
- `Microsoft.Extensions.Http.Resilience` to version `9.2.0`
These updates may provide bug fixes, new features, and performance improvements.
- Removed `System.Threading` directive from `VectorSearchService.cs`
- Updated `BeginTransactionAsync` call to include `cancellationToken`
- Upgraded `Microsoft.SemanticKernel` package to version `1.36.1`
Introduce support for `CancellationToken` across various methods to allow for task cancellation and improve responsiveness.
- Update `DecodeAsync` method in `DocxContentDecoder.cs`, `PdfContentDecoder.cs`, `TextContentDecoder.cs`, and `IContentDecoder.cs` to include an optional `CancellationToken` parameter.
- Modify endpoint handlers in `Program.cs` to accept and pass `CancellationToken` parameters.
- Update methods in `ChatService.cs` to include `CancellationToken` parameters.
- Update methods in `DocumentService.cs` to include `CancellationToken` parameters.
- Update methods in `VectorSearchService.cs` to include `CancellationToken` parameters.
These changes ensure that long-running operations can be canceled if needed, improving the application's ability to handle cancellation requests gracefully.
The response format for the `/api/ask-streaming` endpoint has been simplified by removing multiple individual elements that contained parts of the answer.
The README.md file was updated to correct the terminology from "tag" to "property" for the *streamState* attribute.
Updated README.md to document new `/api/documents`, `/api/ask`, and `/api/ask-streaming` endpoints, including features like conversation history, token usage, and response streaming. Enhanced Program.cs by adding new endpoints for asking questions and streaming responses, with additional metadata. Updated `documentsApiGroup` to include new document management endpoints.
Refactored Program.cs to use AddAzureSql with new options. Added VectorSearchService and DocumentService as scoped services. Updated documentsApiGroup to use DocumentService for document operations and added a delete document endpoint. Moved document-related methods from VectorSearchService to new DocumentService for better separation of concerns.
- Replace `TotalTokenCount` with `EmbeddingTokenCount` in `ImportDocumentResponse`.
- Add `OriginalQuestion` and `ReformulatedQuestion` fields to `QuestionResponse` and a new constructor.
- Add a new constructor to `TokenUsageResponse` to initialize `Question`.
- Add `TextChunkerService` to service collection in `Program.cs`.
- Clarify prompt and update token counting in `ChatService`.
- Differentiate token counting in `TokenizerService` with `CountChatCompletionTokens` and `CountEmbeddingTokens`.
- Update `VectorSearchService` to use `TextChunkerService` and new token counting methods.
- Introduce `TextChunkerService` for text splitting and tokenization.
Upgraded Microsoft.SemanticKernel package from version 1.34.0 to 1.35.0 in SqlDatabaseVectorSearch.csproj. This update includes new features, bug fixes, and other improvements provided in the latest version.
Updated README.md to reflect support for PDF, DOCX, and TXT files.
Removed commented-out code in DocxContentDecoder.cs.
Added TextContentDecoder service in Program.cs and updated exception handling middleware.
Updated document upload endpoint description in Program.cs.
Modified VectorSearchService to throw NotSupportedException for unsupported content types.
Added TextContentDecoder class in TextContentDecoder.cs.
- Added `using` statements in `Program.cs` for new content decoding.
- Registered new content decoder services in `builder.Services`.
- Modified `documentsApiGroup.MapPost` to pass `file.ContentType`.
- Refactored `VectorSearchService` to use `IServiceProvider` and handle content types.
- Added `DocumentFormat.OpenXml` package reference.
- Created `DocxContentDecoder` and `PdfContentDecoder` classes.
- Created `IContentDecoder` interface.
- Clarified comment in `ChatService.cs`.
- Added `TokenizerService` and `ILogger` parameters to `VectorSearchService` constructor.
- Updated paragraph splitting to use `tokenizerService.CountTokens`.
- Added logging for token count of each paragraph in `VectorSearchService`.
- Updated `ModelId` comment in `appsettings.json` to include "gpt-4o-mini".
- Changed `MaxTokensPerParagraph` in `appsettings.json` from 1024 to 1000.
Eliminated the 50ms delay in the asynchronous streaming response
logic of the /api/ask-streaming endpoint by removing the line
`await Task.Delay(50);`. This change improves the response time
by removing unnecessary latency after each delta in the response
stream.
- 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.
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`.
Upgraded the Microsoft.SemanticKernel package from version 1.33.0 to 1.34.0 in the SqlDatabaseVectorSearch.csproj file. This update may include bug fixes, new features, or other improvements.
Modified Program.cs to use AddAzureSql for ApplicationDbContext with UseVectorSearch and NoTracking options. Updated EFCore.SqlServer.VectorSearch package to version 9.0.0-preview.2 in SqlDatabaseVectorSearch.csproj.
- Added HTTP client defaults configuration in Program.cs.
- Adjusted OpenAPI configuration order in Program.cs.
- Changed MaxTokensPerParagraph in AppSettings.cs to 1000.
- Added Microsoft.Extensions.Http.Resilience package in SqlDatabaseVectorSearch.csproj.
- Reordered and added ModelId properties in appsettings.json.
Updated `Program.cs` to always execute OpenAPI setup, including `app.MapOpenApi()` and `app.UseSwaggerUI`, and added `options.RemoveServerList()` to `builder.Services.AddOpenApi`. Simplified `app.UseSwaggerUI` call.
In `SqlDatabaseVectorSearch.csproj`, updated `Microsoft.ML.Tokenizers` to `1.0.1`, `Microsoft.ML.Tokenizers.Data.Cl100kBase` and `Microsoft.ML.Tokenizers.Data.O200kBase` to `1.0.1`, `MinimalHelpers.OpenApi` to `2.1.3`, and `TinyHelpers.AspNetCore` to `4.0.15`.
- Updated EFCore.SqlServer.VectorSearch from 0.2.0 to 9.0.0-preview.1
- Updated Microsoft.AspNetCore.OpenApi from 9.0.0 to 9.0.1
- Updated Microsoft.EntityFrameworkCore.SqlServer from [8.0.11,9.0.0) to 9.0.1
- Updated Microsoft.Extensions.Caching.Hybrid from 9.0.0-preview.9.24556.5 to 9.1.0-preview.1.25064.3
The `ChatService` class now includes a private readonly field `appSettings`, initialized via the constructor. A new method `CreateQuestionAsync` has been added to handle question creation asynchronously, leveraging chat history. Additionally, a comment has been updated for clarity regarding chunk limitations.
Updated Program.cs to use ConfigureAndGet for settings and added TokenizerService singleton. Modified ChatService to include TokenizerService and updated prompt logic for token limits. Added TokenizerService class using TiktokenTokenizer. Updated AppSettings and AzureOpenAISettings with new token and model settings. Updated SqlDatabaseVectorSearch.csproj with new package references and version bump. Updated appsettings.json with new settings.
Enhanced comments in ChatService for token counting clarity.
Updated Microsoft.SemanticKernel to 1.33.0 in SqlDatabaseVectorSearch.csproj.
Added possible values comment for ModelId in appsettings.json.
Upgraded Swashbuckle.AspNetCore.SwaggerUI from 7.1.0 to 7.2.0.
Upgraded TinyHelpers.AspNetCore from 4.0.5 to 4.0.6.
These updates may include bug fixes, performance improvements,
or new features.