Skip to main content

swarmauri_llm_groq

Swarmauri SDK

swarmauri_llm_groq

Provider-specific Swarmauri import package for Groq OpenAI-compatible chat, tool use, vision-language, streaming, and audio transcription workflows.

pypi: swarmauri_llm_groq Source version: 0.11.0 Python: >=3.10,<3.15 Layer: community Lifecycle: active License: Apache-2.0 Notice: attribution

Monthly PyPI downloads: swarmauri_llm_groq README hits: swarmauri_llm_groq

README standards: CI gate Tests: example source Certification: not certified Governance: repository policy Evidence: source and CI

Overview · Installation · Quick Start · Usage · API · Contributing · Governance · License


Overview

Summary

swarmauri_llm_groq provides provider-specific Groq imports for Swarmauri applications that need fast OpenAI-compatible inference. The package exports chat, tool-calling, vision, and audio adapters while keeping their runtime implementations aligned with swarmauri_standard.

Groq's public API documentation describes an OpenAI-compatible base URL at https://api.groq.com/openai/v1, with endpoints for chat completions, audio transcriptions, and audio translations. This package maps those API surfaces into Swarmauri components:

  • GroqModel for chat completions, streaming, JSON responses, and batch helper workflows.
  • GroqToolModel for function/tool calling through Swarmauri Toolkit instances.
  • GroqVisionModel for vision-language chat completion payloads.
  • GroqAIAudio for transcription and translation with Groq-hosted Whisper models.

Why This Package

  • Keep Groq-specific model dependencies explicit while preserving common Swarmauri conversation and toolkit patterns.
  • Use Groq's low-latency OpenAI-compatible chat completions without rewriting application code around raw HTTP payloads.
  • Add tool calling, vision-language prompts, or speech-to-text workflows from one provider package.
  • Swap between Groq and other Swarmauri LLM provider packages while retaining familiar predict, stream, apredict, astream, batch, and abatch workflows.

When to Use

Choose swarmauri_llm_groq when your integration needs provider-specific Swarmauri import package for Groq OpenAI-compatible chat, tool use, vision-language, streaming, and audio transcription workflows. Match the imports below to your application boundary and install its declared dependencies before using the example.

Features

  • GroqModel for synchronous, asynchronous, streaming, JSON, and batch chat completion workflows.
  • GroqToolModel for Groq tool use with Swarmauri Toolkit schemas.
  • GroqVisionModel for OpenAI-compatible vision-language chat payloads.
  • GroqAIAudio for Whisper transcription and translation tasks.
  • Usage metadata support where Groq chat responses include usage data.
  • Model discovery through Groq's OpenAI-compatible models endpoint for chat.
  • Compatibility with Python 3.10, 3.11, 3.12, 3.13, and 3.14.

Non-Goals

swarmauri_llm_groq owns provider-specific Swarmauri import package for Groq OpenAI-compatible chat, tool use, vision-language, streaming, and audio transcription workflows. Its imports do not by themselves configure credentials, deploy a service, or certify the behavior of its consumers. Dependencies and neighboring packages retain their own documented responsibilities.


Getting Started

Prerequisites

Create a Groq API key in the Groq console and pass it to the model constructor as api_key=.... Package live tests are skipped unless provider credentials are available in the environment.

Installation

uv add swarmauri_llm_groq
pip install swarmauri_llm_groq

uv

uv add swarmauri_llm_groq

pip

python -m pip install swarmauri_llm_groq

Poetry

poetry add swarmauri_llm_groq

Quick Start

Example

Source: docs/readme/quick_start.py.

from swarmauri_llm_groq import GroqModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(
    HumanMessage(content="Write a one-sentence release note.")
)

model = GroqModel(api_key="GROQ_API_KEY")
result = model.predict(conversation=conversation, max_tokens=120)

print(result.get_last().content)

Expected Result

The example demonstrates the documented swarmauri_llm_groq source boundary or workflow. Complete its required configuration first. README CI checks the maintained source’s syntax and declarations; it does not claim that external services or the application workflow were exercised.


Usage

Common Workflows

Source: docs/readme/usage.py.

from swarmauri_llm_groq import GroqModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(
    HumanMessage(content="Write a one-sentence release note.")
)

model = GroqModel(api_key="GROQ_API_KEY")
result = model.predict(conversation=conversation, max_tokens=120)

print(result.get_last().content)

Streaming Chat Completion

from swarmauri_llm_groq import GroqModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(HumanMessage(content="List three build pipeline risks."))

model = GroqModel(api_key="GROQ_API_KEY")

for token in model.stream(conversation=conversation):
    print(token, end="")

Tool Calling

from swarmauri_llm_groq import GroqToolModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage
from swarmauri_standard.toolkits.Toolkit import Toolkit

conversation = Conversation()
conversation.add_message(HumanMessage(content="Use a tool if one is relevant."))

toolkit = Toolkit()
model = GroqToolModel(api_key="GROQ_API_KEY")
result = model.predict(conversation=conversation, toolkit=toolkit)

print(result.get_last().content)

Audio Transcription

from swarmauri_llm_groq import GroqAIAudio

audio = GroqAIAudio(api_key="GROQ_API_KEY")
text = audio.predict("meeting.wav", task="transcription")

print(text)

Vision-Language Prompt

from swarmauri_llm_groq import GroqVisionModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(
    HumanMessage(
        content=[
            {"type": "text", "text": "Describe the image."},
            {"type": "image_url", "image_url": {"url": "https://example.com/image.png"}},
        ]
    )
)

model = GroqVisionModel(api_key="GROQ_API_KEY")
result = model.predict(conversation=conversation)

print(result.get_last().content)

Configuration

Configure swarmauri_llm_groq through the APIs in package source; its manifest describes installation requirements, not an implicit service configuration. No additional package-global configuration contract is inferred from dependencies.

Error Handling

The inspected swarmauri_llm_groq source does not establish a package-wide exception hierarchy. Preserve errors from its declared dependencies and validate inputs using the specific public contract in package source.

Best Practices

  • Store Groq API keys in environment variables or a secrets manager.
  • Confirm model availability against Groq's current model catalog before production deployment.
  • Use GroqToolModel only when tools are needed; plain chat requests are simpler with GroqModel.
  • Use GroqAIAudio for file-based transcription and translation, not streaming audio.
  • Prefer newer Swarmauri VLM and STT imports for new projects when available.

Package Boundary

What It Owns

swarmauri_llm_groq is located in community and owns provider-specific Swarmauri import package for Groq OpenAI-compatible chat, tool use, vision-language, streaming, and audio transcription workflows. Source-declared APIs include GroqAIAudio, GroqModel, GroqToolModel, GroqVLM, GroqVisionModel. The manifest records its direct dependency boundary.

Public API and Import Surfaces

Import namespace: swarmauri_llm_groq.

Source-declared exports or types: GroqAIAudio, GroqModel, GroqToolModel, GroqVLM, GroqVisionModel.

Inspect package source for exact signatures; this inventory does not designate every internal module as stable.

Entry Points

  • swarmauri.llms → GroqAIAudio → swarmauri_llm_groq.GroqAIAudio:GroqAIAudio
  • swarmauri.llms → GroqModel → swarmauri_llm_groq.GroqModel:GroqModel
  • swarmauri.llms → GroqVisionModel → swarmauri_llm_groq.GroqVisionModel:GroqVisionModel
  • swarmauri.tool_llms → GroqToolModel → swarmauri_llm_groq.GroqToolModel:GroqToolModel

Injected Dependencies

The direct installation dependencies of swarmauri_llm_groq are swarmauri-core, swarmauri-base, swarmauri-standard. These declarations do not imply automatic provider selection. Pass collaborators through the explicit constructors or call signatures in package source.

Protocol Consumers

No direct package-manifest dependency on swarmauri_llm_groq was found in the audited three-repository inventory. External consumers may still use its documented imports or commands.

Extensions

For swarmauri_llm_groq, use the source-declared public interfaces (GroqAIAudio, GroqModel, GroqToolModel, GroqVLM, GroqVisionModel) when composing or extending behavior. Its entry-point section below is authoritative for registered plugins; no additional extension loader is inferred from the package name.


Operations and Readiness

Operational Requirements

Operate swarmauri_llm_groq according to its actual entry points and collaborators. The dependency and Python requirements in the manifest are prerequisites; deployment topology, credentials, and readiness remain the responsibility of the consuming application unless explicitly documented above.

Health and Observability

This README does not establish a standalone health endpoint for swarmauri_llm_groq. Observe the concrete caller’s results, exceptions, and existing test reports. An application that embeds this package must define its own health and telemetry contract.

Security and Resource Limits

Apply the input, credential, and resource constraints implemented in package source. The swarmauri_llm_groq README gate is a documentation check, not a security review or a substitute for the implementation’s limits and caller authorization.

Compatibility

This source version of swarmauri_llm_groq declares Python >=3.10,<3.15. Consult its dependency constraints before upgrading. Source-version and registry-version badges have separate meanings; this migration makes no additional platform or interoperability certification claim.


Verification

Tests

Run python -m pytest tests/unit/test_readme_sources.py from the swarmauri_llm_groq package directory for the maintained example source checks (Python compilation and non-Python file presence). Existing package tests include:

The repository README gate also checks the required heading tree, metadata, managed fragments, and referenced files.

Certification Status

No external certification is asserted for swarmauri_llm_groq by this documentation migration. README conformance, example syntax, runtime tests, and protocol or security certification are distinct evidence scopes.

Evidence

The README standards CI records mechanical documentation results for its tested commit. The package source and example sources support the package-boundary description; external runtime behavior requires its own test evidence.


FAQ

Why

What does swarmauri_llm_groq install?

It installs provider package entry points for GroqModel, GroqToolModel, GroqVisionModel, and GroqAIAudio.

Which Groq endpoints does it call?

The chat, tool, and vision adapters post to https://api.groq.com/openai/v1/chat/completions. The audio adapter uses https://api.groq.com/openai/v1/audio/transcriptions and https://api.groq.com/openai/v1/audio/translations.

Does it support tool calling?

Yes. GroqToolModel converts Swarmauri toolkit schemas to Groq-compatible tool definitions, sends them with chat completions, executes returned tool calls, and can perform a follow-up model call with tool results.

Does it support vision?

Yes. GroqVisionModel accepts Swarmauri message content that can include structured content lists for OpenAI-compatible vision chat payloads. The runtime also emits a deprecation warning that new projects should review the newer Swarmauri VLM imports when available.

Does audio streaming work?

No. GroqAIAudio supports file-based transcription and translation through predict, apredict, batch, and abatch. Its stream and astream methods raise NotImplementedError.

How

How do I start? Install or synchronize the environment under Getting Started, follow the maintained example for swarmauri_llm_groq, and consult package source for the exact types and signatures involved.

When

When should I validate an upgrade? Recheck swarmauri_llm_groq whenever its source version, declared collaborators, configuration, or caller changes. Run relevant behavioral tests in addition to the README gate before promotion.


More Documentation

The repository contribution guide, package source, and manifest provide the supporting context for swarmauri_llm_groq. The README policy defines the common document structure.


Contributing

How to Contribute

Follow the contribution guide and include a focused example or regression for changes to swarmauri_llm_groq. Keep package behavior, its documented boundary, and its tests aligned.

Development Setup

Work from the pkgs/50-community/swarmauri_llm_groq checkout. Synchronize its declared development environment with uv, then run the relevant package tests and python -m pytest tests/unit/test_readme_sources.py. The repository’s dedicated README job installs readme-standards==0.1.3 without resolving unrelated runtime packages.

Notes for Maintainers

Foundational Swarmauri Packages

Provider Documentation


Governance

Ownership and Decision Making

Changes to swarmauri_llm_groq follow the maintainer review process of swarmauri/swarmauri-sdk and its contribution guide. Author attribution remains in the manifest; this README does not assign new publishing or administrative authority.

Standards and Policies

swarmauri_llm_groq follows the versioned package-guide-v1 outline. All fixed headings, hierarchy, order, separators, and package-specific branding are checked by CI; reviewers assess the accuracy and usefulness of authored claims.

Lifecycle and Migration

The swarmauri_llm_groq source version is 0.11.0.


License and Attribution

License

Licensed under Apache-2.0. See LICENSE.

Apache-2.0

Notices

See NOTICE for attribution.

Metadata

Release files for swarmauri_llm_groq 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swarmauri_llm_groq 0.11.0
File Size Uploaded Provenance Actions
swarmauri_llm_groq-0.11.0.tar.gz 20.5 kB Without provenance Details for swarmauri_llm_groq-0.11.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for swarmauri_llm_groq 0.11.0
File Interpreter ABI Platform Actions
swarmauri_llm_groq-0.11.0-py3-none-any.whl Python 3 none any Details for swarmauri_llm_groq-0.11.0-py3-none-any.whl

Total release size: 37.2 kB

Release files / swarmauri_llm_groq-0.11.0.tar.gz

Download URL swarmauri_llm_groq-0.11.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
45d71e4b836e7ca7bc86107e4d624416082bfd64a451820dab58138173cfe803
BLAKE2b-256 checksum
How to use checksums
0944e7bc1ce17cb3cb39d6eda79ffde8a4dbfea5ddcb94da626aba14728d5806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / swarmauri_llm_groq-0.11.0-py3-none-any.whl

Download URL swarmauri_llm_groq-0.11.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f56038d76f5dd35cbc534479cd65d9526e206ebb44624428191885bf112288e7
BLAKE2b-256 checksum
How to use checksums
d27e3afc9cb6fadbdfe1dd4e9371a83efe188690091e40ae3a963921196f20de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for swarmauri_llm_groq 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page