GroqModel (providers/groq_llm.py)

Patter · libraries/python/getpatter/providers/groq_llm.py · python · MIT
ai, AI / Agents

Thin wrapper around OpenAI-compatible Groq LLM provider for easy integration into pipelines.

# Source: https://github.com/PatterAI/Patter | License: MIT | Copyright 2026 Patter Contributors
# Provided via justclaw.it.com; keep this notice with the code.
"""Groq LLM provider for Patter's pipeline mode.

Groq's Chat Completions API is OpenAI-compatible, so this provider is a
thin wrapper around :class:`getpatter.services.llm_loop.OpenAILLMProvider`
that points at ``https://api.groq.com/openai/v1``. All sampling kwargs
(``response_format``, ``parallel_tool_calls``, ``tool_choice``, ``seed``,
``top_p``, ``frequency_penalty``, ``presence_penalty``, ``stop``,
``temperature``, ``max_tokens``) are inherited from the parent and
forwarded to ``chat.completions.create`` automatically.
"""

from __future__ import annotations

import logging
import os
from enum import StrEnum
from typing impor

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

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

Get a free API key