ai-server/source/model/DummyModel.py

19 lines
380 B
Python

import json
from source.model import base
class DummyModel(base.BaseModel):
"""
A dummy model, mainly used to test the API and the manager.
simply send back the request made to it.
"""
def _load(self) -> None:
pass
def _unload(self) -> None:
pass
def _infer(self, payload: dict) -> str | bytes:
return json.dumps(payload)