bernardomayol/AngularApp1

C#

0

2 commits

updated May 22, 2026

See the code

README

AngularApp1 — Chatbot using Hugging Face LLM

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.

What changed

  • 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.
  • Client (Angular)
    • 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).

Requirements

Configuration

Set your Hugging Face API key in an environment variable named HUGGINGFACE_API_KEY.

  • Windows (PowerShell)

bernardomayol/AngularApp1

C#

0

2 commits

updated May 22, 2026

See the code

README

AngularApp1 — Chatbot using Hugging Face LLM

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.

What changed

  • 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.
  • Client (Angular)
    • 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).

Requirements

Configuration

Set your Hugging Face API key in an environment variable named HUGGINGFACE_API_KEY.

  • Windows (PowerShell)