diff --git a/SqlDatabaseVectorSearch/Components/Pages/Documents.razor b/SqlDatabaseVectorSearch/Components/Pages/Documents.razor index 9750b68..1308ad1 100644 --- a/SqlDatabaseVectorSearch/Components/Pages/Documents.razor +++ b/SqlDatabaseVectorSearch/Components/Pages/Documents.razor @@ -17,35 +17,37 @@ -
-
-
- - - - - - +
+
+
+
+ + + + + + +
+
+
+
+ + + + + Document ID + + +
+ +
+
+
+ +
-
-
- - - - - Document ID - - -
- -
-
-
- -
-
-
+ @if (isLoading && documents.Count == 0) @@ -125,6 +127,7 @@ else private Button deleteButton = default!; private bool isLoading = true; + private bool isUploading; private IList documents = []; private UploadDocument Model { get; set; } = new(); @@ -178,6 +181,9 @@ else uploadButton.ShowLoading(); + isUploading = true; + await InvokeAsync(StateHasChanged); + var fileName = Model.File.Name; try @@ -205,6 +211,9 @@ else finally { uploadButton.HideLoading(); + + isUploading = false; + await InvokeAsync(StateHasChanged); } } diff --git a/SqlDatabaseVectorSearch/Program.cs b/SqlDatabaseVectorSearch/Program.cs index 62496d0..9f322e8 100644 --- a/SqlDatabaseVectorSearch/Program.cs +++ b/SqlDatabaseVectorSearch/Program.cs @@ -174,7 +174,7 @@ var textSearchOptions = new TextSearchProviderOptions() sb.AppendLine("- Do NOT add inline citations."); sb.AppendLine("- At the END of your answer, add a sources section that follows this template exactly, where the sources label and the page label are localized in the same language as the user's question:"); sb.AppendLine(" *localized-sources-label*"); - sb.AppendLine(" 1. **SourceName**, localized-page-label PageNumber: *supporting excerpt of about 15-20 words*"); + sb.AppendLine(" 1. **SourceName**, localized-page-label PageNumber: *supporting excerpt of about 20-30 words*"); sb.AppendLine("- Omit the page label and the page number when the page number is not available."); sb.AppendLine("- Do NOT use headings or links in the sources section."); sb.AppendLine("- Include ONLY sources you actually used. No duplicates.");