-
Notifications
You must be signed in to change notification settings - Fork 3
🔍 .NET Aspire Demo with Qdrant Search & GitHub Models Integration #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nctionality - Created Test.razor for a simple test page with time update and alert features. - Added TestInteractive.razor for an interactive counter page. - Implemented VectorSearch.razor for semantic search with UI for query input and results display. - Introduced Routes.razor for routing configuration. - Added _Imports.razor for common using directives across components. - Defined global usings in GlobalUsings.cs for cleaner code. - Created ApiModels.cs to define data models for API interactions. - Set up NLWebNet.Frontend.csproj with necessary project properties and references. - Implemented Program.cs for application startup and service configuration. - Configured launchSettings.json for local development. - Added appsettings.json for application configuration. - Created app.css for styling the frontend application. - Developed Extensions.cs for common service defaults including health checks and OpenTelemetry. - Set up ServiceDefaults.csproj with required packages for service defaults. - Added start-aspire.bat for easy application startup. - Created interfaces and service classes for vector storage. - Removed obsolete appsettings.Development.json. - Added AskController and McpController for handling API requests. - Created unit test classes for AskController and McpController.
- Added a sidebar with a navigation menu in MainLayout.razor. - Updated NavMenu.razor to change the "Test" link to "Configuration". - Introduced a new Configuration.razor page for managing GitHub token settings and providing information about semantic search. - Modified RssIngestion.razor to improve error handling and user feedback with success/error messages. - Removed obsolete Test and TestInteractive pages. - Updated VectorSearch.razor to utilize new API and embedding configuration services. - Created ApiService and EmbeddingConfigurationService for better API interaction and configuration management. - Updated Program.cs to register new services and improve dependency injection. - Added detailed setup instructions for vector search in VECTOR_SEARCH_SETUP.md. - Improved CSS styles for better layout and responsiveness.
- Updated RssIngestion.razor to improve demo feed ingestion with GitHub token support and enhanced logging. - Modified VectorSearch.razor to include dynamic threshold adjustments based on GitHub token presence, added debug information, and improved user interaction with search functionality. - Configured additional OpenTelemetry sources for better tracing in Program.cs. - Enhanced ApiService with detailed logging and tracing for search operations, including correlation IDs for better tracking. - Updated appsettings.json to adjust logging levels for System.Net.Http to Information for improved visibility.
… implement document browsing functionality
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR transforms the AspireDemo sample into a full semantic vector search application using Qdrant and GitHub Models, including a Blazor UI, ingestion workflows, and service defaults.
- Adds Qdrant vector database integration and vector storage service
- Implements composite embedding service (GitHub Models → OpenAI → simple fallback)
- Builds a Blazor front-end with pages for RSS ingestion, vector search, statistics, and configuration
Reviewed Changes
Copilot reviewed 47 out of 60 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| samples/Demo/appsettings.Development.json | Removed legacy local dev settings |
| samples/AspireHost/Program.cs | Cleared out default AspireHost sample bootstrap |
| samples/AspireDemo/start-aspire.bat | Added a quick-start batch script |
| samples/AspireDemo/VECTOR_SEARCH_SETUP.md | Documented vector search configuration options |
| samples/AspireDemo/ServiceDefaults/ServiceDefaults.csproj | Added shared Aspire defaults project |
| samples/AspireDemo/ServiceDefaults/Extensions.cs | Factored out default health checks, resilience, OpenTelemetry |
| samples/AspireDemo/NLWebNet.Frontend/wwwroot/css/app.css | Added base styles and layout CSS |
| samples/AspireDemo/NLWebNet.Frontend/Program.cs | Wired up service defaults, HttpClients, and DI |
| samples/AspireDemo/NLWebNet.Frontend/Services/EmbeddingConfigurationService.cs | Session-backed GitHub token management |
| samples/AspireDemo/NLWebNet.Frontend/Services/ApiService.cs | Front-end API client with tracing & logging |
| samples/AspireDemo/NLWebNet.Frontend/Components/Pages/VectorSearch.razor | Main vector search UI with search & diagnostic tools |
| samples/AspireDemo/NLWebNet.AspireApp/Services/QdrantVectorStorageService.cs | Qdrant collection initialization and CRUD |
| samples/AspireDemo/NLWebNet.AspireApp/Services/GitHubModelsEmbeddingService.cs | Embedding service for GitHub Models API |
| samples/AspireDemo/NLWebNet.AspireApp/Program.cs | .NET minimal APIs mapping ingestion, search, diagnostics |
samples/AspireDemo/NLWebNet.Frontend/Components/Pages/VectorSearch.razor
Outdated
Show resolved
Hide resolved
| httpClient.BaseAddress = _httpClient.BaseAddress; | ||
| httpClient.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", githubToken); | ||
| httpClient.DefaultRequestHeaders.Add("User-Agent", "NLWebNet-AspireDemo"); | ||
| } |
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Creating and disposing a new HttpClient instance manually bypasses IHttpClientFactory benefits and can lead to socket exhaustion. Consider injecting IHttpClientFactory and using CreateClient for per-request token configuration.
| // Use the actual API URL from Aspire dashboard | ||
| client.BaseAddress = new Uri("https://localhost:7220"); | ||
| client.Timeout = TimeSpan.FromMinutes(5); // 5 minutes for RSS ingestion | ||
| }); |
Copilot
AI
Jun 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Registering the default HttpClient as the "DirectApiClient" may confuse consumers expecting the named "ApiClient". Consider injecting IHttpClientFactory or aligning the default with the primary ApiClient registration.
samples/AspireDemo/NLWebNet.Frontend/Components/Layout/NavMenu.razor
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <[email protected]>
Add Qdrant Vector Search & GitHub Models to AspireDemo
What This Does
Adds real semantic search capabilities to the .NET Aspire demo using:
Key Features
Search Experience
GitHub Models Integration
Content Management
Developer Tools
Usage
dotnet run(Qdrant container starts automatically via Aspire)Known Issues
Technical Details
This transforms the AspireDemo from a basic proof-of-concept into a functional vector search application while maintaining all existing functionality.
Addresses Issues: #1 (Backend Data Sources), #2 (AI/LLM Integration)
Related to: #4 (Authentication patterns)
Files changed: 60 files, 5,187 additions
Dependencies: Requires Qdrant container (handled by Aspire)
Breaking changes: None