{
  "title": "AI Module #2",
  "video_id": "LFFoGfYFMn4",
  "published": "2024-07-03T14:17:58+0000",
  "complexity": "Easy",
  "old_url": "https://workflows-of-ai.com/workflow/ai-module-2",
  "description": "A Drupal AI hello world: run Gemma 2B locally with Ollama, test it in the AI API Explorer and use its code to summarize articles.",
  "subtitle": "Run Gemma locally with Ollama, try it in the AI API Explorer and turn the generated code into an article summary on save.",
  "summary": "Ollama runs the small Gemma 2B model on a machine with 16 GB of RAM and no graphics card, reachable from DDEV through host.docker.internal. The AI API Explorer sends a chat call with the Wi-Fi turned off and generates the PHP code for it. That code goes into a presave hook that writes a one-sentence summary into the article's summary field.",
  "categories": [
    "Drupal AI"
  ],
  "intro_html": "<p>In this episode we will continue showcasing the AI module. We will do a kind of Hello World for Drupal AI and AI in general.</p><p>We will summarize an article, and we will make sure to do it locally on machines that many people have access to.</p><p>We will also showcase the AI API Explorer to autogenerate code for a specific call.</p>",
  "intro_added": false,
  "chapters": [
    "0:00 A hello world for Drupal AI",
    "1:42 Installing Ollama on Linux",
    "1:55 Summarizing an article on save",
    "2:51 Running Ollama for DDEV",
    "3:48 Pulling the Gemma 2B model",
    "4:43 Configuring the Ollama provider",
    "5:12 Chatting in the AI API Explorer",
    "6:10 Copying the generated code",
    "9:07 Running the summary locally"
  ],
  "corrections": [
    [
      "freely give",
      "FreelyGive"
    ],
    [
      "triple AI",
      "Drupal AI"
    ],
    [
      "druple",
      "Drupal"
    ],
    [
      "AMA P GMA",
      "ollama pull gemma"
    ],
    [
      "AMA serve",
      "ollama serve"
    ],
    [
      "use AMA",
      "use Ollama"
    ],
    [
      "AMA then",
      "Ollama then"
    ],
    [
      "with AMA",
      "with Ollama"
    ],
    [
      "Ama here",
      "Ollama here"
    ],
    [
      "a Lama",
      "Ollama"
    ],
    [
      "of Lama",
      "of Ollama"
    ],
    [
      "GMA is",
      "Gemma is"
    ],
    [
      "Gemma to B",
      "Gemma 2B"
    ],
    [
      "N videoi",
      "nvidia-smi"
    ],
    [
      "host. doer. internal",
      "host.docker.internal"
    ],
    [
      "open ey",
      "OpenAI"
    ]
  ],
  "ai_note": "The video and the introduction are Marcus's own, first published on workflows-of-ai.com. AI wrote the subtitle, the summary and the video chapters from the transcript, and corrected misheard names in YouTube's automatic captions."
}