Introduction to Angular Language Kit
Angular Language Kit is a privacy-first AI chat application built with Angular. It leverages Chromeโs Built-in AI (Gemini Nano) to run Large Language Models directly in your browser. This means your data is processed locallyโofflineโwithout ever being sent to a cloud server.
๐ Features
- ๐ Local Inference: Uses the Chrome Prompt API to generate responses entirely on-device.
- ๐ Persistent History: Chat sessions are saved locally using IndexedDB, keeping your conversations private and persistent across reloads.
- ๐ง Auto-Summarization: Uses the Chrome Summarizer API to automatically generate concise titles for your chat sessions.
- โก Real-time Streaming: Implements full streaming responses for a snappy, conversational experience.
- ๐จ Modern UI: Built with Angular Material and Tailwind CSS for a responsive, clean interface.
- Token Tracking: Real-time visualization of token usage and context window limits.
๐ Architecture
The project is structured around strongly-typed services:
PromptApiService: Manages the AI session lifecycle, streaming responses, and tracks token quota/usage (inputUsage,inputQuota).SummarizerService: Detects capabilities and generates headlines for new chats using thewindow.ai.summarizerAPI.StorageService: Handles all IndexedDB operations to store chat metadata and message history locally.