Fight Chat Control
156 by tokai | 29 comments on Hacker News.
Sunday, August 10, 2025
New top story on Hacker News: Show HN: Llmswap – Python package to reduce LLM API costs by 50-90% with caching
Show HN: Llmswap – Python package to reduce LLM API costs by 50-90% with caching
8 by sreenathmenon | 1 comments on Hacker News.
I built llmswap to solve a problem I kept hitting in hackathons - burning through API credits while testing the same prompts repeatedly during development. It's a simple Python package that provides a unified interface for OpenAI, Anthropic, Google Gemini, and local models (Ollama), with built-in response caching that can cut API costs by 50-90%. Key features: - Intelligent caching with TTL and memory limits - Context-aware caching for multi-user apps - Auto-fallback between providers when one fails - Zero configuration - works with environment variables from llmswap import LLMClient client = LLMClient(cache_enabled=True) response = client.query("Explain quantum computing") # Second identical query returns from cache instantly (free) The caching is disabled by default for security. When enabled, it's thread-safe and includes context isolation for multi-user applications. Built this from components of a hackathon project. Already at 2.2k downloads on PyPI. Hope it helps others save on API costs during development. GitHub: https://ift.tt/AGBkUiI PyPI: https://ift.tt/IhBwHSL
8 by sreenathmenon | 1 comments on Hacker News.
I built llmswap to solve a problem I kept hitting in hackathons - burning through API credits while testing the same prompts repeatedly during development. It's a simple Python package that provides a unified interface for OpenAI, Anthropic, Google Gemini, and local models (Ollama), with built-in response caching that can cut API costs by 50-90%. Key features: - Intelligent caching with TTL and memory limits - Context-aware caching for multi-user apps - Auto-fallback between providers when one fails - Zero configuration - works with environment variables from llmswap import LLMClient client = LLMClient(cache_enabled=True) response = client.query("Explain quantum computing") # Second identical query returns from cache instantly (free) The caching is disabled by default for security. When enabled, it's thread-safe and includes context isolation for multi-user applications. Built this from components of a hackathon project. Already at 2.2k downloads on PyPI. Hope it helps others save on API costs during development. GitHub: https://ift.tt/AGBkUiI PyPI: https://ift.tt/IhBwHSL
Saturday, August 9, 2025
Friday, August 8, 2025
Thursday, August 7, 2025
Wednesday, August 6, 2025
Tuesday, August 5, 2025
Monday, August 4, 2025
New top story on Hacker News: Show HN: Mathpad – Physical keypad for typing 100+ math symbols anywhere
Show HN: Mathpad – Physical keypad for typing 100+ math symbols anywhere
15 by MagneLauritzen | 10 comments on Hacker News.
Here's something different than your usual fare: A physical keypad that lets you directly type math! Ever tried typing mathematical equations in your code IDE, email, or on Slack? You might know it can be tricky. Mathpad solves this with dedicated keys for Greek letters, calculus symbols, and more. Press the ∫ key and get ∫, in any application that accepts text. It uses Unicode composition, so it works everywhere: Browsers, chat apps, code editors, Word, you name it. Basically, anywhere you can type text, Mathpad lets you type mathematics. I built Mathpad after getting frustrated with the friction of typing equations in e.g. Word, and what a pain in the ass it was to find the specific symbols I needed. I assumed that a product like Mathpad already existed, but that was not true and I had to build it myself. It turned out to be pretty useful! Three years of solo development later, I'm launching on Crowd Supply. One of the trickiest parts of this project was finding someone who could manufacture custom keycaps with mathematical symbols. Shoutout to Loic at 3dkeycap.com for making it possible! Fully open source (hardware + software): https://ift.tt/tWIaqgs Campaign: https://ift.tt/NyBf2Tc Project log: https://ift.tt/fVEnxJg
15 by MagneLauritzen | 10 comments on Hacker News.
Here's something different than your usual fare: A physical keypad that lets you directly type math! Ever tried typing mathematical equations in your code IDE, email, or on Slack? You might know it can be tricky. Mathpad solves this with dedicated keys for Greek letters, calculus symbols, and more. Press the ∫ key and get ∫, in any application that accepts text. It uses Unicode composition, so it works everywhere: Browsers, chat apps, code editors, Word, you name it. Basically, anywhere you can type text, Mathpad lets you type mathematics. I built Mathpad after getting frustrated with the friction of typing equations in e.g. Word, and what a pain in the ass it was to find the specific symbols I needed. I assumed that a product like Mathpad already existed, but that was not true and I had to build it myself. It turned out to be pretty useful! Three years of solo development later, I'm launching on Crowd Supply. One of the trickiest parts of this project was finding someone who could manufacture custom keycaps with mathematical symbols. Shoutout to Loic at 3dkeycap.com for making it possible! Fully open source (hardware + software): https://ift.tt/tWIaqgs Campaign: https://ift.tt/NyBf2Tc Project log: https://ift.tt/fVEnxJg