Module: Ollama::Client::Command

Extended by:
Tins::Concern
Included in:
Ollama::Client
Defined in:
lib/ollama/client/command.rb

Overview

A module that provides command definition capabilities for the Ollama client.

This module extends the client with the ability to define and execute API commands by creating method definitions that correspond to Ollama API endpoints. It handles the creation of command methods with appropriate default and streaming handlers, and manages the execution flow for these commands.

Examples:

Defining a custom command

class MyClient
  include Ollama::Client::Command
  command(:custom, default_handler: Single, stream_handler: Collector)
end