mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-14 17:13:25 +00:00
feat: blackbox call
This commit is contained in:
@ -7,13 +7,15 @@ from .blackbox import Blackbox
|
||||
|
||||
class SUM(Blackbox):
|
||||
|
||||
def __call__(self, *args, **kwargs):
|
||||
return self.processing(*args, **kwargs)
|
||||
|
||||
def valid(self, *args, **kwargs) -> bool:
|
||||
data = args[0]
|
||||
return isinstance(data, list)
|
||||
|
||||
def processing(self, *args, **kwargs) -> Coroutine[Any, Any, Any]:
|
||||
data = args[0]
|
||||
return sum(data)
|
||||
def processing(self, *args, **kwargs):
|
||||
return sum(args)
|
||||
|
||||
async def fast_api_handler(self, request: Request) -> Response:
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user