MuseSparkInference#

class rapidtools.models.MuseSparkInference(api_key: str | Path | None = None, model_id: str | None = None, max_workers: int = 10, max_retries: int = 3, system_instruction: str | None = None, temperature: float = 0.4, max_tokens: int = 2048, timeout: float = 60.0, base_url: str | None = None)[source]#

Bases: BaseOpenAICompatibleInference

Meta Model API client for the Muse Spark family.

Uses the OpenAI-compatible /chat/completions endpoint with Bearer authentication. Images are sent inline as Base64 data URIs.

Example

>>> from rapidtools.models import MuseSparkInference
>>> MuseSparkInference.list_known_models()[0]
'muse-spark-1.3'
>>> model = MuseSparkInference(api_key='...', model_id='muse-spark-1.3')
>>> out = model.run_inference(['a.jpg', 'b.jpg'], 'Which house is damaged?')
>>> print(out.text)

Methods

list_available_models

List the model IDs accessible with api_key.

list_known_models

Return the curated catalogue of model IDs for this provider.

run_batch

Run run_inference() over many assets with a thread pool.

run_inference

Send images and a prompt to /chat/completions.

IMAGE_DETAIL: str | None = None#