Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Open compass VLMEvalKit QwenAPI

From Leeroopedia
Revision as of 13:31, 16 February 2026 by Admin (talk | contribs) (Auto-imported from implementations/Open_compass_VLMEvalKit_QwenAPI.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Field Value
source VLMEvalKit
domain Vision, API_Integration

Overview

QwenAPI provides a VLMEvalKit API adapter for Alibaba Qwen pure language models via DashScope.

Description

QwenAPI inherits from BaseAPI and uses the DashScope SDK to communicate with Alibaba's Qwen language model API. It is a text-only adapter (not vision) supporting models such as qwen-turbo, qwen-plus, qwen-max, and qwen-max-longcontext. The class provides configurable seed, temperature, and max token parameters, and authenticates via the DASHSCOPE_API_KEY environment variable.

Usage

Use this adapter when evaluating Qwen pure language models (not vision models) through the Alibaba DashScope API.

Code Reference

  • Source: vlmeval/api/qwen_api.py, Lines: L1-74
  • Import: from vlmeval.api.qwen_api import QwenAPI

Signature:

class QwenAPI(BaseAPI):
    def __init__(self, model='qwen-max-1201', retry=5, verbose=True,
                 seed=2680, temperature=0.0, system_prompt=None,
                 key=None, max_tokens=2048, proxy=None, **kwargs): ...
    def generate_inner(self, inputs, **kwargs): ...

I/O Contract

Direction Description
Inputs message — text/image/video content list; model-specific params via kwargs
Outputs generate() returns str prediction; generate_inner() returns (int, str, str) tuple

Usage Examples

# Example instantiation
model = QwenAPI(model='qwen-max-1201')
response = model.generate(message)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment