QwenInference

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: BaseOpenAICompatibleInference

Alibaba 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_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#