Skip to content

Enhance eShopLite with new features and Azure integration #5

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

Merged
merged 9 commits into from
May 30, 2025

Conversation

elbruno
Copy link
Contributor

@elbruno elbruno commented May 30, 2025

Introduce significant updates including a refined project structure, enhanced sentiment analysis capabilities, and Azure OpenAI integration. Add new UI components, improve logging, and implement concurrent processing for user insights. Update documentation for clarity and better user guidance.

elbruno added 9 commits May 30, 2025 15:38
DETAILS

This commit introduces significant updates across multiple files, including:

- Enhancements to `README.md` with badges, a detailed description of the eShopLite application, and an expanded features section.
- Modifications to `.editorconfig` to silence warnings and updates to project files for new project references and configurations.
- Creation of `DataEntities.csproj` and `Product.cs` to define the project structure and introduce a new product class with JSON serialization.
- Updates to `UserQuestionInsight.cs` for sentiment analysis and user insights.
- New Azure deployment configurations in `azure.yaml` and infrastructure definitions in `main.bicep` and related files.
- Introduction of various UI components and pages, including `Home.razor`, `Products.razor`, and `Search.razor`.
- Addition of a new CSS file, `bootstrap.min.css`, for Bootstrap styles.
- Creation of the `ProductVector.cs` class to manage product vectors and updates to the project to target .NET 9.0.
DETAILS

Updated `Search.razor` to inject `UserInsightService` and launch `GenerateInsights` in a separate thread for concurrent processing. Introduced `UserInsightService.cs` with methods to fetch user insights from the API, including error handling and logging for improved traceability.
DETAILS

Updated `Program.cs` to include Azure OpenAI client configurations, a new SQL Server DbContext, and a chat client setup. Enhanced logging for Azure OpenAI resources and added database creation logic. Modified development environment handling by logging resource information and enabling OpenTelemetry. Corrected globalization invariant mode setting. Expanded service registration to include `UserInsightService` with an HTTP client. Cleaned up import statements in `UserInsightService.cs`.
DETAILS

- Added `using Insights.Endpoints` for new functionality.
- Implemented `app.MapInsightsEndpoints()` for routing.
- Removed `builder.AddProject<Projects.Insights>("insights");` to change project integration.
- Eliminated `builder.Build().Run();` for flexible execution structure.
DETAILS

- Updated `NavMenu.razor` to include a new navigation link for "Insights".
- Created `Insights.razor` page with routing, data fetching, and a table to display user insights.
- Implemented asynchronous loading with a simulated delay for streaming rendering.
DETAILS

- Modified `Sentiment` enum in `UserQuestionInsight.cs` to include `NotDefined` and adjusted `Negative`.
- Updated `Generator.cs` to add Microsoft Semantic Kernel namespaces and modified the constructor to accept a `Kernel` parameter.
- Introduced `GenerateInsightAsync` method to define agents for sentiment analysis and language detection, storing results in the database.
- Added `Analysis` class to encapsulate sentiment and language detection results, initializing `Sentiment` to `NotDefined`.
- Updated `Insights.csproj` with new package references for Microsoft Semantic Kernel components.
- Registered additional services in `Program.cs` for the Semantic Kernel and updated `Generator` service registration to include the new `Kernel` instance.
- Overall, these changes enhance the application's capabilities in analyzing user questions for sentiment and language.
DETAILS

- Added using directives for Microsoft.Extensions.AI and Semantic Kernel in `Generator.cs`.
- Modified warning suppression to include SKEXP0001.
- Commented out old orchestration code and added new instantiation of `StructuredOutputTransform<Analysis>` using `_chatClient.AsIChatClient()`.
- Updated `Program.cs` with new using directives for Azure.AI.OpenAI.
- Changed client instantiation from `OpenAIClient` to `AzureOpenAIClient`.
- Updated method for adding Azure OpenAI chat client to include the client as a parameter.
DETAILS

Updated `Generator.cs` to improve sentiment and language analysis functionality. Added new using directives for Microsoft libraries and modified agent instructions to specify output formats. Restructured orchestration to return an array of strings and introduced `TransformToAnalysis` method to process agent results. Removed logging code and updated database insertion to utilize the new analysis method.
Copy link

Check Country Locale in URLs

We have automatically detected added country locale to URLs in your files.
Review and remove country-specific locale from URLs to resolve this issue.

Check the file paths and associated URLs inside them.
For more details, check our Contributing Guide.

File Full Path Issues
scenarios/01-SemanticSearch/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire106
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire106
3https://learn.microsoft.com/en-us/dotnet/aspire/azure/local-provisioning#net-aspire-azure-hosting-integrations169
scenarios/04-chromadb/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire60
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire60
scenarios/02-AzureAISearch/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire107
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire107
3https://learn.microsoft.com/en-us/dotnet/aspire/azure/local-provisioning#net-aspire-azure-hosting-integrations170
scenarios/05-deepseek/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire111
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire111
3https://azure.microsoft.com/en-us/blog/deepseek-r1-is-now-available-on-azure-ai-foundry-and-github/?msockid=1f1ab8a22fcf6b370b36add42e5b6aa3221
scenarios/03-RealtimeAudio/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire113
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire113
3https://learn.microsoft.com/en-us/azure/ai-services/openai/realtime-audio-quickstart211
4https://learn.microsoft.com/en-us/shows/generative-ai-for-beginners-dotnet/practical-samples-eshoplite-with-real-time-audio219
scenarios/06-mcp/README.md
#LinkLine Number
1https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire123
2https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/setup-tooling?tabs=windows&pivots=visual-studio#install-net-aspire123
3https://learn.microsoft.com/en-us/dotnet/aspire/azure/local-provisioning#net-aspire-azure-hosting-integrations211

Copy link

👋 Thanks for contributing @elbruno! We will review the pull request and get back to you soon.

Copy link

Check Broken Paths

We have automatically detected the following broken relative paths in your files.
Review and fix the paths to resolve this issue.

Check the file paths and associated broken paths inside them.
For more details, check our Contributing Guide.

File Full Path Issues
scenarios/05-deepseek/README.md
#LinkLine Number
1./images/90ytrunfromcodespaces.png227
scenarios/06-mcp/README.md
#LinkLine Number
1./src/eShopLite-Mcp.sln79

@elbruno elbruno merged commit dbc5a83 into main May 30, 2025
2 of 6 checks passed
@elbruno elbruno deleted the bruno-add-agents-concurrent branch May 30, 2025 21:17
Copy link

Check Broken URLs

We have automatically detected the following broken URLs in your files. Review and fix the paths to resolve this issue.

Check the file paths and associated broken URLs inside them.
For more details, check our Contributing Guide.

File Full Path Issues
scenarios/01-SemanticSearch/README.md
#LinkLine Number
1https://twitter.com/elbruno2
scenarios/02-AzureAISearch/README.md
#LinkLine Number
1https://twitter.com/elbruno2
scenarios/05-deepseek/README.md
#LinkLine Number
1https://twitter.com/elbruno2
scenarios/03-RealtimeAudio/README.md
#LinkLine Number
1https://twitter.com/elbruno2
scenarios/06-mcp/README.md
#LinkLine Number
1https://twitter.com/elbruno3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant