Skip to main content

Provider-specific Swarmauri import package for Hyperbolic OpenAI-compatible chat, vision-language inference, streaming, and text-to-speech workflows.

Project description

Swarmauri Logo

PyPI - Downloads Hits PyPI - Python Version PyPI - License PyPI - swarmauri_llm_hyperbolic Discord

Swarmauri Hyperbolic LLM

swarmauri_llm_hyperbolic provides provider-specific imports for Hyperbolic inference in Swarmauri applications. The package exports text chat, vision-language, and text-to-speech adapters while keeping implementation parity with swarmauri_standard.

Hyperbolic's inference documentation describes OpenAI-compatible chat completion APIs under https://api.hyperbolic.xyz/v1/chat/completions, model catalog discovery under /v1/models, vision-language models that accept images alongside text, and audio generation through /v1/audio/generation. This package maps those provider surfaces into Swarmauri components:

  • HyperbolicModel for OpenAI-compatible text chat completions.
  • HyperbolicVisionModel for vision-language chat completions with image input.
  • HyperbolicAudioTTS for text-to-speech audio generation.

Why Use This Package?

  • Keep Hyperbolic-specific inference imports explicit in Swarmauri applications.
  • Use Swarmauri Conversation objects with Hyperbolic's OpenAI-compatible chat and vision-language endpoints.
  • Add text-to-speech generation without wiring raw base64 audio responses in application code.
  • Preserve a provider package boundary while relying on shared swarmauri_standard runtime implementations.

FAQ

What does swarmauri_llm_hyperbolic install?

It installs provider package entry points for HyperbolicModel, HyperbolicVisionModel, and HyperbolicAudioTTS.

Which Hyperbolic endpoints does it use?

HyperbolicModel and HyperbolicVisionModel use Hyperbolic's OpenAI-compatible chat/completions endpoint. HyperbolicAudioTTS posts to https://api.hyperbolic.xyz/v1/audio/generation and writes the returned base64 audio payload to a local file.

Does it support streaming?

HyperbolicModel supports synchronous and asynchronous streaming for chat completion responses. HyperbolicAudioTTS does not support streaming and raises NotImplementedError for stream and astream.

Does it support vision-language prompts?

Yes. HyperbolicVisionModel accepts Swarmauri message content lists with text and image input. Local image file paths can be converted to base64 data URLs by the runtime helper.

Is the TTS adapter a general LLM?

No. HyperbolicAudioTTS is a text-to-speech adapter kept in this provider package for compatibility. The runtime deprecation warning points new projects toward newer Swarmauri TTS imports when available.

Features

  • HyperbolicModel for sync, async, streaming, and batch chat completion workflows.
  • HyperbolicVisionModel for image-plus-text prompts against Hyperbolic VLMs.
  • HyperbolicAudioTTS for synchronous and asynchronous text-to-speech generation.
  • Model discovery through Hyperbolic's /models endpoint.
  • Generation controls including temperature, max_tokens, top_p, top_k, and stop.
  • Optional usage metadata handling on chat responses when available.
  • Compatibility with Python 3.10, 3.11, 3.12, 3.13, and 3.14.

Installation

uv add swarmauri_llm_hyperbolic
pip install swarmauri_llm_hyperbolic

Prerequisites

Create a Hyperbolic API key in the Hyperbolic app and pass it to the model constructor as api_key=....

Usage

from swarmauri_llm_hyperbolic import HyperbolicModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(HumanMessage(content="Summarize this deployment risk."))

model = HyperbolicModel(api_key="HYPERBOLIC_API_KEY")
result = model.predict(conversation=conversation, max_tokens=200)

print(result.get_last().content)

Streaming Chat

from swarmauri_llm_hyperbolic import HyperbolicModel
from swarmauri_standard.conversations.Conversation import Conversation
from swarmauri_standard.messages.HumanMessage import HumanMessage

conversation = Conversation()
conversation.add_message(HumanMessage(content="List three API gateway checks."))

model = HyperbolicModel(api_key="HYPERBOLIC_API_KEY")

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

Vision-Language Prompt

from swarmauri_llm_hyperbolic import HyperbolicVisionModel
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.jpg"}},
        ]
    )
)

model = HyperbolicVisionModel(api_key="HYPERBOLIC_API_KEY")
result = model.predict(conversation=conversation)

print(result.get_last().content)

Text To Speech

from swarmauri_llm_hyperbolic import HyperbolicAudioTTS

tts = HyperbolicAudioTTS(
    api_key="HYPERBOLIC_API_KEY",
    language="EN",
    speaker="EN-US",
    speed=1.0,
)

audio_path = tts.predict("Swarmauri turns model providers into components.")
print(audio_path)

Related Packages

Foundational Swarmauri Packages

Provider Documentation

Best Practices

  • Store Hyperbolic API keys in environment variables or a secrets manager.
  • Confirm model availability and provider capability flags before production deployment.
  • Use HyperbolicVisionModel only for image-aware prompts; plain chat is simpler with HyperbolicModel.
  • Use explicit output paths for TTS generation so generated audio files are easy to manage.
  • Prefer newer Swarmauri VLM and TTS imports for new projects when available.

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swarmauri_llm_hyperbolic-0.11.0.dev1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file swarmauri_llm_hyperbolic-0.11.0.dev1.tar.gz.

File metadata

  • Download URL: swarmauri_llm_hyperbolic-0.11.0.dev1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_llm_hyperbolic-0.11.0.dev1.tar.gz
Algorithm Hash digest
SHA256 fe0c60745e7fa1970bae141992baba9fa4d2f59e5801eefebcd943ca3f2d28d9
MD5 f64df4b26562221722253f09dacd0011
BLAKE2b-256 555cfbf6b3380cb09abe21bc2b8b0d0ec1eef4506afdd24493c0d76480d199a6

See more details on using hashes here.

File details

Details for the file swarmauri_llm_hyperbolic-0.11.0.dev1-py3-none-any.whl.

File metadata

  • Download URL: swarmauri_llm_hyperbolic-0.11.0.dev1-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","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}

File hashes

Hashes for swarmauri_llm_hyperbolic-0.11.0.dev1-py3-none-any.whl
Algorithm Hash digest
SHA256 3b01c2343cc5603260b424442682ee7b2df564962cf221104569192439dc9be5
MD5 93da14ab470e114e2e974a496e2e7945
BLAKE2b-256 fe433b9a33141b67b2d2569bc3c78073a535013405534b365fe4f9c5ea14c520

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page