QwenInference#
- class rapidtools.models.QwenInference(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, region: str = 'intl', base_url: str | None = None, timeout: float = 60.0)[source]#
Bases:
BaseOpenAICompatibleInferenceAlibaba Cloud Model Studio (DashScope) client for hosted Qwen models.
Example
>>> from rapidtools.models import QwenInference >>> QwenInference.list_known_models()[0] 'qwen3.8-max' >>> model = QwenInference(api_key='sk-...', region='intl') >>> out = model.run_inference('roof.jpg', 'Is the roof intact?') >>> 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.