This project is a Recipe Builder solution that leverages Semantic Kernel and agentic AI. It includes multiple agents: the Recipe Builder Agent, the Vegan Substitution Agent, and the Gluten-Free Substitution Agent.
- .NET 9.0 SDK
- Azure CLI
- Azure OpenAI Service instance
- Auth uses
DefaultAzureCredentialand assumes you are logged in via the Azure CLI withaz loginand have theCognitive Services OpenAI UserRBAC role granted to you on the Azure OpenAI Service instance.
Create a .env file in the RecipeChat.Console project with the following variables:
AZURE_OPENAI_ENDPOINT="https://[YOUR_ENDPOINT_NAME].openai.azure.com"
AZURE_OPENAI_DEPLOYMENT_NAME="[YOUR_MODEL_DEPLOYMENT_NAME]"
OTEL_ENDPOINT="[YOUR_OTEL_ENDPOINT]"
LOG_HTTP_REQUESTS="true"Follow these steps to get your development environment set up:
# Clone the repository
git clone https://github.com/swigerb/recipe-chat.git
# Go into the repository
cd recipe-chat
# Restore dependencies
dotnet restoreTo run the Recipe Builder solution:
# Run the project
dotnet runThe Recipe Builder Agent assists in creating custom recipes based on user input.
The Vegan Substitution Agent provides vegan alternatives for ingredients in recipes.
The Gluten-Free Substitution Agent suggests gluten-free substitutions for recipe ingredients.
I highly recommend the .NET Aspire dashboard to create an OTEL endpoint that you can use for this solution and capture/visual monitoring.
To run the Aspire dashboard locally, follow these steps:
-
Start the Dashboard:
- Use the Docker command line to start the dashboard. Open your terminal and run the following command:
docker run --rm -it -d -p 18888:18888 -p 4317:18889 --name aspire-dashboard mcr.microsoft.com/dotnet/aspire-dashboard:latest
- This command will start a container from the Aspire dashboard image and map the necessary ports.
- Use the Docker command line to start the dashboard. Open your terminal and run the following command:
-
Access the Dashboard:
- Once the container is running, open your web browser and navigate to http://localhost:18888 to view the dashboard UI.
-
Login to the Dashboard:
- The dashboard requires a token for authentication. The token is printed in the container logs. You can retrieve it by running:
docker logs aspire-dashboard
- Copy the token and use it to log in to the dashboard.
- The dashboard requires a token for authentication. The token is printed in the container logs. You can retrieve it by running:
-
Send Telemetry to the Dashboard:
- Configure your applications to send telemetry data to the dashboard using the OpenTelemetry Protocol (OTLP). The endpoint for receiving data is http://localhost:4317.
For more detailed configuration options, refer to the official documentation. https://learn.microsoft.com/en-us/dotnet/aspire/fundamentals/dashboard/standalone?tabs=bash
We welcome contributions from the community! To contribute:
- Fork the repository
- Create a new branch (
git checkout -b feature/feature-name) - Commit your changes (
git commit -m 'Add feature') - Push to the branch (
git push origin feature/feature-name) - Open a Pull Request
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or suggestions, feel free to reach out!
Author: Brian Swiger - [email protected]
Project Link: https://github.com/swigerb/recipe-chat