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:
BaseOpenAICompatibleInferenceMeta Model API client for the Muse Spark family.
Uses the OpenAI-compatible
/chat/completionsendpoint 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_modelsList the model IDs accessible with
api_key.list_known_modelsReturn the curated catalogue of model IDs for this provider.
run_batchRun
run_inference()over many assets with a thread pool.run_inferenceSend images and a prompt to
/chat/completions.