A local nutrition tracking app powered by AI
YuHeng leverages Large Language Models (LLMs) to provide advanced food recognition and nutritional analysis. It supports multiple providers through a factory-based architecture.
gemini-2.5-flash, gemini-2.5-pro.gpt-4o and gpt-4o-mini.The LLM abstraction layer is located in lib/llm/:
interface.ts: Defines the common LLMProvider interface (e.g., analyzeImage, fixDish).factory.ts: Instantiates the correct provider implementation based on user settings.providers/: Contains implementation-specific logic for each provider.LLM settings can be configured in the application’s Settings page:
API keys are stored in the application’s persistent settings. On the server, they are used to initialize the appropriate LLM client for each request, ensuring that keys are handled securely and not exposed to the client-side code where possible.