Skip to content

Qwen (Alibaba DashScope)

The Qwen provider gives access to Alibaba's Qwen models via the DashScope API. Models are accessed with the qwen: prefix.

Setup

export DASHSCOPE_API_KEY="your-api-key"

Base URL: https://dashscope.aliyuncs.com/compatible-mode/v1

Available Models

Model Use Case
qwen-turbo Fast, cost-effective evaluations
qwen-plus Higher quality, more capable

Usage

from eval_lib.metrics import AnswerRelevancyMetric

metric = AnswerRelevancyMetric(model="qwen:qwen-turbo", threshold=0.7)