Implementation:Open compass VLMEvalKit HunyuanWrapper
| 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)