SShortSingh.
Back to feed

Chrome's Prompt API now runs on-device AI without API keys or per-token billing

0
·17 views

Chrome's Prompt API, backed by the Gemini Nano model, is now stable for extensions from Chrome 138 and for web pages from Chrome 148. It lets a page ask the browser to summarize, classify, or rewrite text locally, with no server round-trip. Developers treat this as a browser capability much like storage or notifications, though the model must first download and may be unavailable on some hardware. The guide stresses feature detection and a backend fallback, since users lacking the model would otherwise hit a dead feature. It also notes that the API surface differs between web and extension contexts and corrects an earlier streaming example that wrongly treated each chunk as cumulative text.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Generating Changelogs from Git Log Between Two Tags

Writing release notes by hand from git log output is tedious, especially when sorting commit messages by type. The article shows how to list commit subjects between two tags or hashes using git log with a pretty format. It then demonstrates a shell approach that uses grep to split commits prefixed with feat, fix, and chore into separate files and group them under Markdown headings. The author notes this pipeline becomes unwieldy when commit conventions are inconsistent or release sizes grow. The piece ends by promoting a paid tool that automates grouped Markdown changelog generation.

0
ProgrammingDEV Community ·

PantryPulse: An Open-Source Kitchen App for Tracking Ingredients and Cutting Food Waste

A developer has built PantryPulse, a kitchen companion app designed to help users cook with what they already have and waste less food. The app aims to scan ingredients and maintain a running inventory of a user's fridge contents. It pairs a React Native and Expo mobile and web front end with a Python backend and AI-assisted food features. The project was submitted to a Hacktoberfest Open-Source AI Challenge and emphasizes privacy-friendly, offline-first AI that works across devices. The developer also highlights open-source development as a way to let others contribute and to explore running AI locally instead of relying on closed services.

0
ProgrammingDEV Community ·

Safely cleaning up merged git branches and avoiding the squash-merge trap

Long-lived repositories often accumulate many stale local branches that are hard to track. The article recommends switching to main, pulling the latest changes, and listing branches already merged into main, since deleting those loses no work. It advises using the lowercase -d flag, which refuses to delete unmerged branches, and previewing candidates in a file before removing anything. Because squash-merged pull requests are not recognized by git branch --merged, the author suggests verifying them on the pull request page before forcing deletion with -D. Remote branch deletion is flagged as something to coordinate with the team, and the piece closes with a promotion for a paid Python helper tool.

0
ProgrammingDEV Community ·

Mr. Pending, a Snail Engineer, Tests AI-Designed Machines to Press One Button

A developer built The Department of Unnecessary Engineering, a playful project in which a snail character named Mr. Pending must press a blue button through an elaborate chain of machines. Behind the joke, a small open-weight AI model, Gemma, designs contraptions from parts like ramps and conveyors, and a deterministic simulator checks whether they actually work. When a machine fails, the AI proposes repairs and tries again. In a small test, the E2B model succeeded in 2 of 15 builds with an improved prompt, while the larger E4B model succeeded 4 of 15 but used considerably more memory. The project was released as open source on GitHub, with the simulator, evaluation results and local setup instructions included.