SShortSingh.
Back to feed

Run AI Locally in Node.js Using OGAD's HTTP Gateway on Your Own Machine

0
·1 views

Developers can now integrate local AI models into Node.js workflows without relying on external API calls, using a tool called OGAD (Off Grid AI Desktop). OGAD runs downloaded language models on the user's own computer and exposes them via a local HTTP gateway, typically on port 7878. A Node.js script using the built-in fetch API can query this gateway to retrieve available models and generate text completions entirely offline. The approach requires no external npm packages and works with OGAD's free core features, making it accessible for build tools, automation scripts, and similar workflows. Developers are advised to keep the gateway bound to localhost and avoid exposing the port to untrusted networks, as the inference endpoints require no API key.

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 ·

DEV Community Publishes Detailed Guide on AMSI Bypass Techniques for Developers

A comprehensive technical guide covering Windows Antimalware Scan Interface (AMSI) architecture and bypass methods has been published on DEV Community. The guide details seven techniques including memory patching, obfuscation, reflection bypass, DLL hijacking, and ETW patching, each accompanied by working code examples. AMSI, introduced to address gaps in traditional antivirus scanning, intercepts scripts and in-memory content before execution across PowerShell, VBScript, Office Macros, and .NET assemblies. The article also includes detection and defense strategies alongside a hands-on lab setup aimed at security researchers and developers. It is positioned as a reference resource for understanding both offensive exploitation and defensive countermeasures related to AMSI.

0
ProgrammingDEV Community ·

Why a Perfect Lighthouse Accessibility Score Still Left Gaps in One Developer's Site

A developer building a practice portfolio site for a fictional potter achieved a 100 Lighthouse accessibility score after fixing a single color contrast issue with terracotta-colored links on a cream background. However, a manual audit revealed further gaps that automated tools had missed entirely. Inline SVG icons in the contact section were given aria-hidden and focusable=false attributes to prevent unpredictable screen reader behavior, since they duplicated information already present in text labels. Landmark navigation was also restructured so that About, Gallery, and Contact sections could be jumped to directly by screen reader users, while the hero section was deliberately left out of the landmark list. A deeper review later uncovered invalid HTML — a heading nested inside an address element — which no automated tool or screen reader had flagged, underscoring that automated scores measure only what they are built to check.

0
ProgrammingDEV Community ·

DDL vs DML: Understanding the Two Core Categories of SQL Commands

SQL commands are broadly divided into categories, with DDL (Data Definition Language) and DML (Data Manipulation Language) being the most fundamental. DDL commands like CREATE, ALTER, DROP, and TRUNCATE define and modify the structure of database objects such as tables and indexes, and are typically auto-committed, meaning changes cannot be rolled back. DML commands like SELECT, INSERT, UPDATE, and DELETE operate on the data stored within those structures, and are transactional, allowing changes to be committed or rolled back. Two additional categories also exist: DCL (Data Control Language) manages user permissions via GRANT and REVOKE, while TCL (Transaction Control Language) handles the management of DML transactions. Understanding the distinction between these command types is considered a foundational step in learning SQL.

0
ProgrammingDEV Community ·

WPPilot Plugin Lets Claude Edit WordPress Post Titles Safely Without Touching Live Pages

A self-hosted WordPress plugin called WPPilot turns a WordPress site into an MCP server, allowing AI clients like Claude to propose edits to published posts without immediately altering the live page. The tool uses a preview-before-apply workflow, where the AI computes a structured diff and presents it for human approval before any changes are written. Only specific fields such as the title and excerpt are targeted, while the body, slug, status, and other elements remain untouched. An apply-preview step then executes the approved changes, but only after verifying the post has not been modified since the preview was generated. The plugin requires WordPress 6.9 or later, PHP 8.0 or higher, and must be installed manually from GitHub as it is not listed on WordPress.org.