File size: 767 Bytes
af9251e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
from abc import ABC, abstractmethod
import torch
from models.base import (BaseAnswer,
AnswerResult)
class MultimodalAnswerResult(AnswerResult):
image: str = None
class RemoteRpcModel(BaseAnswer, ABC):
@property
@abstractmethod
def _api_key(self) -> str:
"""Return _api_key of client."""
@property
@abstractmethod
def _api_base_url(self) -> str:
"""Return _api_base of client host bash url."""
@abstractmethod
def set_api_key(self, api_key: str):
"""set set_api_key"""
@abstractmethod
def set_api_base_url(self, api_base_url: str):
"""set api_base_url"""
@abstractmethod
def call_model_name(self, model_name):
"""call model name of client"""
|