mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-28 04:59:52 +01:00
21 lines
635 B
Python
21 lines
635 B
Python
from abc import ABC, abstractmethod
|
|
from config.logger import setup_logging
|
|
|
|
TAG = __name__
|
|
logger = setup_logging()
|
|
|
|
|
|
class VLLMProviderBase(ABC):
|
|
def use_multimodal_llm(self) -> bool:
|
|
"""Whether the image should be handled by the configured main LLM.
|
|
|
|
Most visual providers answer the vision request themselves. Providers
|
|
that return ``True`` instead add the image to the dialogue and let the
|
|
selected LLM complete the tool-call conversation.
|
|
"""
|
|
return False
|
|
|
|
@abstractmethod
|
|
def response(self, question, base64_image):
|
|
"""VLLM response generator"""
|
|
pass
|