Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Deno 5 min read How-to mediumAdept

The Dino πŸ¦•, the Llama πŸ¦™, and the Whale πŸ‹

Deno's built-in Jupyter kernel, Ollama and LangChain.js combine into a low-friction environment for experimenting with a locally hosted DeepSeek R1 8B model in TypeScript. The walkthrough covers pulling the model with Ollama, creating a Deno-kernel notebook in VSCode, and building a LangChain RunnableSequence that pairs a prompt template with a zod-backed StructuredOutputParser so responses come back as validated JSON. It also renders the chain as a Mermaid diagram inside the notebook. Most of the setup effort goes into running the model locally, and the same chain could point at a hosted API like OpenAI or Anthropic instead.

Assumes: TypeScript basicsJSON Schema

Related posts

  • Build a custom RAG AI agent in TypeScript and Jupyter

    Deno mediumAdept

    A local agentic RAG pipeline built in TypeScript inside a Deno Jupyter notebook, using LangChain and LangGraph with Ollama models. Deno blog posts are loaded with Cheerio, split into 500-character chunks, embedded with mxbai-embed-large and stored in an in-memory vector store exposed as a retriever tool. A LangGraph state graph wires an agent node (Llama 3.2 3B, the only small local model the author got tool calling working with) to retrieval, a binary relevance grader, query rewriting and final answer generation with DeepSeek R1 8B. The setup suits confidential documents that must not leave the machine.

  • Getting Started with the OpenAI SDK for Deno

    Deno mediumAdept

    OpenAI's official Deno SDK on deno.land/x is a TypeScript-first module loaded over HTTPS, which makes loading more efficient on edge platforms like Deno Deploy, Netlify and Supabase and gives VS Code type support without extra configuration. The walkthrough covers installing the SDK through an import map in deno.jsonc and setting OPENAI_API_KEY. It then builds three examples: text generation with GPT-4 Turbo, a single-file Hono JSX app that generates images with DALL-E 3, and image analysis with gpt-4-vision-preview through the chat completions API.

  • Local LLM Messenger: Chat with GenAI on Your iPhone

    Docker mediumAdept

    Local LLM Messenger (LoLLMM), an honorable-mention project from Docker's AI/ML Hackathon by Justin Garrison, lets you send iMessages to LLMs running on your own machine. A FastAPI Python app receives Sendblue webhooks, routes prompts to local Ollama models (defaulting to llama2) or optionally OpenAI's GPT-3.5 Turbo and DALL-E 2, keeps conversation context in a file, and supports slash commands for switching models. Docker Compose runs the app, an ngrok tunnel exposing port 8000, and an Ollama container with optional NVIDIA GPU access. A setup walkthrough covers cloning the repo, configuring API keys in .env, and adding the ngrok authtoken.

  • How to Make an AI Chatbot from Scratch using Docker Model Runner

    Docker mediumAdept

    A local GenAI chatbot built on Docker Model Runner, which runs llama.cpp models natively on the host and exposes an OpenAI-compatible API to containers. A Go backend uses the OpenAI client to stream tokens over SSE to a React/TypeScript UI. The backend also acts as a metrics bridge, exporting llama.cpp-specific Prometheus gauges such as tokens per second, context size, prompt evaluation time and memory per token, alongside Grafana dashboards and Jaeger tracing. The walkthrough covers pulling Llama 3.2 1B, starting the stack with docker compose, wiring Grafana to Prometheus, and the key code paths.

  • Run Gemma 3 with Docker Model Runner: Fully Local GenAI Developer Experience

    Docker mediumAdept

    Docker Model Runner (in Docker Desktop for macOS 4.40.0+) exposes an OpenAI-compatible API on localhost, so Gemma 3 can be pulled with `docker model pull ai/gemma3` and called through the standard OpenAI SDK by pointing baseURL at http://localhost:12434/engines/v1. A sample Comment Processing System uses it to generate synthetic user feedback, categorize sentiment, cluster comments with mxbai-embed-large embeddings, extract feature ideas as JSON and draft support replies, all with no external API calls. Per-task temperature and token limits can be tuned freely because local inference carries no per-token cost or rate limit.

The quest for software engineering knowledge.

Look:
Layout: