Module: Ollama::Handlers

Included in:
Ollama, Client
Defined in:
lib/ollama/handlers.rb

Overview

A module that groups together various handler classes used to process responses from the Ollama API.

Handlers are responsible for defining how API responses should be processed, displayed, or stored. They implement a common interface that allows them to be passed as arguments to client commands, providing flexibility in how response data is handled.

Examples:

Using a handler with a client command

ollama.generate(model: 'llama3.1', prompt: 'Hello World', &Print)

Defined Under Namespace

Modules: Concern Classes: Collector, DumpJSON, DumpYAML, Markdown, NOP, Print, Progress, Say, Single