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 HunyuanWrapper

From Leeroopedia
Field Value
source VLMEvalKit
domain Vision, API_Integration

Overview

HunyuanWrapper provides a VLMEvalKit API adapter for Tencent Hunyuan vision-language models.

Description

HunyuanWrapper inherits from BaseAPI and uses the Tencent Cloud SDK (tencentcloud-sdk-python) to communicate with the Hunyuan API. It supports custom prompt construction for MCQ datasets, handles image encoding for multimodal inputs, and authenticates via HMAC-based signing using HUNYUAN_SECRET_ID and HUNYUAN_SECRET_KEY environment variables.

Usage

Use this adapter when evaluating Tencent Hunyuan vision models (such as hunyuan-standard-vision) through the Tencent Cloud API.

Code Reference

  • Source: vlmeval/api/hunyuan.py, Lines: L1-183
  • Import: from vlmeval.api.hunyuan import HunyuanWrapper

Signature:

class HunyuanWrapper(BaseAPI):
    def __init__(self, model='hunyuan-standard-vision', retry=5,
                 secret_key=None, secret_id=None, verbose=True,
                 system_prompt=None, temperature=0, timeout=60,
                 api_base='hunyuan.tencentcloudapi.com', **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 = HunyuanWrapper(model='hunyuan-standard-vision')
response = model.generate(message)

Related Pages

Page Connections

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