Skip to main content

Overview

SmallestLLMService provides access to Smallest AI’s Electron model through the OpenAI-compatible chat completions endpoint of the Waves API. It inherits from OpenAILLMService and supports streaming responses, function calling, and context management.

Smallest AI LLM API Reference

Pipecat’s API methods for Smallest AI LLM integration

Example Implementation

Complete example with function calling

Smallest AI Documentation

Official Smallest AI documentation

Installation

Prerequisites

  1. Smallest AI Account: Sign up at Smallest AI
  2. API Key: Generate an API key from your account dashboard

Required Environment Variables

  • SMALLEST_API_KEY: Your Smallest AI API key for authentication

Configuration

str
required
Smallest AI API key for authentication.
str
default:"https://api.smallest.ai/waves/v1"
Base URL for the Smallest AI API endpoint.
SmallestLLMService.Settings
default:"None"
Runtime-configurable settings. See Settings below.
Mapping[str, str] | None
default:"None"
Additional HTTP headers to include in requests.

Settings

Runtime-configurable settings passed via the settings constructor argument using SmallestLLMService.Settings(...). These can be updated mid-conversation with LLMUpdateSettingsFrame. See Service Settings for details. This service uses the same settings as OpenAILLMService. See OpenAI LLM Settings for the full parameter reference. The default model is "electron".

Usage

Basic Setup

With Custom Settings

Notes

  • Developer messages: Electron doesn’t support the developer role, so the service sends developer-role messages as user messages.