LLM (llm/custom.py)

Patter · libraries/python/getpatter/llm/custom.py · python · MIT
ai, AI / Agents

Custom LLM — point Patter's pipeline at ANY OpenAI-compatible endpoint. The industry-standard "Custom LLM" pattern (the name the voice-AI ecosystem uses for this concept): Patter owns the phone leg — carrier, STT, turn-taking, barge-in, TTS — and POSTs each conversation turn to Y

# Source: https://github.com/PatterAI/Patter | License: MIT | Copyright 2026 Patter Contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Custom LLM — point Patter's pipeline at ANY OpenAI-compatible endpoint.

The industry-standard "Custom LLM" pattern (the name the voice-AI
ecosystem uses for this concept): Patter owns the phone leg
— carrier, STT, turn-taking, barge-in, TTS — and POSTs each conversation
turn to YOUR ``/chat/completions`` endpoint. That endpoint can be:

* an **agent runtime** (Hermes, OpenClaw — prefer the dedicated presets
  :mod:`getpatter.llm.hermes` / :mod:`getpatter.llm.openclaw`, which are
  thin subclasses of this same engine with the right defaults baked in),
* a **local inference gateway** (Ollama, vLLM, LM Studio — keyless OK),
* or *

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key