This solution is an Angular + ASP.NET (targeting .NET 9) single-repo project. The Angular client lives in angularapp1.client and the ASP.NET server lives in AngularApp1.Server.
The repository was modified to replace the weather demo with a simple chatbot that proxies requests to the Hugging Face Inference API so your API key stays on the server.
AngularApp1.Server/Controllers/ChatbotController.cs — new controller that proxies chat requests to the Hugging Face Inference API.AngularApp1.Server/Program.cs — registers AddHttpClient() used by the controller.angularapp1.client/src/app/chat.service.ts — service that posts chat input to the server (/api/chat).angularapp1.client/src/app/app.component.ts — replaced weather logic with a chat UI and logic.angularapp1.client/src/app/app.component.html — chat UI template.angularapp1.client/src/app/app.module.ts — added FormsModule (for ngModel).Set your Hugging Face API key in an environment variable named HUGGINGFACE_API_KEY.
This solution is an Angular + ASP.NET (targeting .NET 9) single-repo project. The Angular client lives in angularapp1.client and the ASP.NET server lives in AngularApp1.Server.
The repository was modified to replace the weather demo with a simple chatbot that proxies requests to the Hugging Face Inference API so your API key stays on the server.
AngularApp1.Server/Controllers/ChatbotController.cs — new controller that proxies chat requests to the Hugging Face Inference API.AngularApp1.Server/Program.cs — registers AddHttpClient() used by the controller.angularapp1.client/src/app/chat.service.ts — service that posts chat input to the server (/api/chat).angularapp1.client/src/app/app.component.ts — replaced weather logic with a chat UI and logic.angularapp1.client/src/app/app.component.html — chat UI template.angularapp1.client/src/app/app.module.ts — added FormsModule (for ngModel).Set your Hugging Face API key in an environment variable named HUGGINGFACE_API_KEY.