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 SenseChatVisionWrapper

From Leeroopedia
Field Value
source VLMEvalKit
domain Vision, API_Integration

Overview

SenseChatVisionWrapper provides a VLMEvalKit API adapter for SenseNova vision-language models via the SenseChat API.

Description

SenseChatVisionWrapper inherits from BaseAPI and connects to the SenseNova chat-completions endpoint. It supports image encoding to base64, dataset-specific custom prompts for MCQ and VQA tasks, and configurable max token output. Authentication is handled through the SENSENOVA_API_KEY environment variable.

Usage

Use this adapter when evaluating SenseNova vision models such as SenseNova-V6-5-Pro through the SenseChat API.

Code Reference

  • Source: vlmeval/api/sensechat_vision.py, Lines: L1-307
  • Import: from vlmeval.api.sensechat_vision import SenseChatVisionWrapper

Signature:

class SenseChatVisionWrapper(BaseAPI):
    def __init__(self, base_url="https://api.sensenova.cn/v1/llm/chat-completions",
                 api_key=None, model="SenseNova-V6-5-Pro", retry=5, wait=5,
                 verbose=True, system_prompt=None, max_tokens=16384,
                 **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 = SenseChatVisionWrapper(model='SenseNova-V6-5-Pro')
response = model.generate(message)

Related Pages

Page Connections

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