Commit Graph

168 Commits

Author SHA1 Message Date
Marco Minerva f3a0ec7c31 Little refactoring 2024-07-01 09:49:34 +02:00
Marco Minerva 8ef8836075 Minor updates 2024-06-26 11:05:00 +02:00
Marco Minerva 1840a63d75 Better transaction on document save 2024-06-24 10:31:57 +02:00
Marco Minerva 7a97000c10 Update libraries 2024-06-24 09:45:05 +02:00
Marco Minerva c72ed3054b Update Semantical Kernel comment 2024-06-20 17:21:07 +02:00
Marco Minerva fa58e02709 Refactor and enhance config management
Refactored code to centralize configuration access through a single `AppSettings` instance in `ChatService` and `VectorSearchService`, improving maintainability and reducing verbosity. Introduced new configuration settings (`MaxTokensPerLine`, `MaxTokensPerParagraph`, `OverlapTokens`, `MaxChunksCount`) in `AppSettings.cs` and `appsettings.json` for enhanced flexibility in content processing. Adjusted existing settings usage (`MessageLimit`, `MessageExpiration`) to align with the new access method, and removed obsolete settings (`StoragePath`, `VectorDbPath`, `QueuePath`). These changes simplify the codebase, make the application more configurable and adaptable to different content characteristics, and allow for more controlled vector search operations.
2024-06-17 11:58:30 +02:00
Marco Minerva 7892f01f84 Refactor AskQuestionAsync in ChatService 2024-06-17 11:02:51 +02:00
Marco Minerva 6790850afe Update README.md 2024-06-14 17:56:07 +02:00
Marco Minerva 7848252fae Update README.md 2024-06-14 17:49:48 +02:00
Marco Minerva a51618fd91 Rename Script.sql to Scripts.sql 2024-06-14 17:47:46 +02:00
Marco Minerva 7251e4c902 Update README.md 2024-06-14 17:47:17 +02:00
Marco Minerva dcccdf7365 Enhanced app with Vector Search support
- Updated README.md with details on Vector Support in Azure SQL Database, application functionalities, and setup instructions.
- Removed inheritance of `Question` class from `Search` class and deleted `Search` class.
- Minor adjustment in Program.cs for endpoint description consistency.
- Simplified appsettings.Development.json by removing the empty "ConnectionStrings" section.
- Enhanced Script.sql with SQL commands to create `DocumentChunks` and `Documents` tables, including schema for identifiers, content, embeddings, document names, creation dates, and established a foreign key relationship between the two tables.
2024-06-14 17:42:37 +02:00
Marco Minerva b6c898a3f5 Refactor code and enhance API documentation
- Converted `Question.cs` and `Search.cs` records to `record class` syntax for clarity.
- Organized API endpoints with tags and added new GET and DELETE endpoints in `Program.cs`, including OpenAPI documentation improvements.
- Removed commented-out code in `Program.cs` for cleaner codebase.
- Introduced `WithTags` for better API operation categorization in Swagger UI.
- Added a TODO comment in `ChatService.cs` for future improvement on chunk length check.
- Clarified `using` directives in `VectorSearchService.cs` with namespace aliasing to improve readability.
- Refactored document deletion in `VectorSearchService.cs` to use a private helper method and expanded service capabilities with a new `GetDocumentsAsync` method.
- Introduced a new `Document` model in the `Models` namespace to support document fetching functionality.
- Simplified `appsettings.json` by removing `MaxTokens` configuration for `ChatCompletion` and `Embedding` services.
2024-06-14 17:20:21 +02:00
Marco Minerva db4646330f Enhanced app with Azure AI and vector search
- Modified `ApplicationDbContext.cs` to correct the `.IsVector()` method placement for `DocumentChunk`.
- Removed `MemoryResponse.cs` class, indicating a move away from this model.
- Enhanced `Program.cs` with Azure AI services integration for text embeddings and chat completions. Updated OpenAPI descriptions and reintroduced `/api/ask` with vector search.
- Adjusted `ChatService.cs` to improve question-asking functionality using document chunks.
- Updated `VectorSearchService.cs` with a new `AskQuestionAsync` method for advanced search and response capabilities. Made `GetContentAsync` static.
- Formatted `SqlDatabaseVectorSearch.csproj` and managed NuGet package inclusions.
- Simplified `appsettings.json` by removing unused keys.
- Added a new `Response` record class for standardized service responses.
2024-06-14 12:59:09 +02:00
Marco Minerva 9284ae5377 Initial commit 2024-06-14 11:47:00 +02:00
Marco Minerva 246bf56955 Update README.md 2024-06-14 11:44:31 +02:00
Marco Minerva 3fff089947 Update README.md 2024-06-14 11:38:12 +02:00
Marco Minerva 318f73455b Initial commit 2024-06-14 11:37:55 +02:00