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
- Smallest AI Account: Sign up at Smallest AI
- 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.
Mapping[str, str] | None
default:"None"
Additional HTTP headers to include in requests.
Settings
Runtime-configurable settings passed via thesettings 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
developerrole, so the service sendsdeveloper-role messages asusermessages.