mirror of
https://github.com/JasonYANG170/CodeGeeX4.git
synced 2024-11-27 14:16:35 +00:00
13 lines
360 B
Python
13 lines
360 B
Python
|
class API:
|
||
|
def call(self, **kwargs):
|
||
|
return self.__call__(**kwargs)
|
||
|
|
||
|
def __call__(self, **kwargs):
|
||
|
search_kwargs = {'query': kwargs['query'], 'freshness': 'month'}
|
||
|
search_res = self.search(**search_kwargs)
|
||
|
return search_res
|
||
|
|
||
|
@classmethod
|
||
|
def search(cls, **kwargs) -> list[str]:
|
||
|
raise NotImplementedError
|