Implementation:Open compass VLMEvalKit CWWrapper
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, API_Integration |
Overview
CWWrapper provides a VLMEvalKit API adapter for CloudWalk's Congrong vision-language models.
Description
CWWrapper inherits from BaseAPI and communicates with the CloudWalk API endpoint. It supports configurable image detail levels (high/low), base64 image encoding, and standard OpenAI-compatible chat completion message formatting. Authentication is handled through the CW_API_KEY and CW_API_BASE environment variables.
Usage
Use this adapter when evaluating CloudWalk Congrong vision models (such as cw-congrong-v2.0) through the CloudWalk API.
Code Reference
- Source:
vlmeval/api/cloudwalk.py, Lines: L1-103 - Import:
from vlmeval.api.cloudwalk import CWWrapper
Signature:
class CWWrapper(BaseAPI):
def __init__(self, model='cw-congrong-v2.0', retry=10, key=None,
verbose=True, system_prompt=None, temperature=0,
timeout=600, api_base='', max_tokens=2048,
img_detail='low', **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 = CWWrapper(model='cw-congrong-v2.0')
response = model.generate(message)