Implementation:Open compass VLMEvalKit TeleMM2 Wrapper
| Field | Value |
|---|---|
| source | VLMEvalKit |
| domain | Vision, API_Integration |
Overview
TeleMM2_Wrapper provides a VLMEvalKit API adapter for the TeleMM2 vision-language model from TeleAGI.
Description
TeleMM2_Wrapper inherits from BaseAPI and communicates with the TeleAGI streaming chat completions endpoint. It uses a custom prompt utility (TeleMM2_PromptUtil) for dataset-specific prompt construction including chain-of-thought prompting with boxed answer formatting, and supports a predefined system prompt for structured thinking. Authentication uses AUTHOR and APP_ID environment variables.
Usage
Use this adapter when evaluating TeleMM2 vision-language models through the TeleAGI API platform.
Code Reference
- Source:
vlmeval/api/telemm.py, Lines: L1-293 - Import:
from vlmeval.api.telemm import TeleMM2_Wrapper
Signature:
class TeleMM2_Wrapper(BaseAPI):
def __init__(self, model=None, retry=3, verbose=True, timeout=600,
authorization=None, app_id=None, system_prompt=None,
max_tokens=20480, **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 = TeleMM2_Wrapper(model='telemm2')
response = model.generate(message)