mirror of
https://github.com/JasonYANG170/CodeGeeX4.git
synced 2024-11-23 20:26:29 +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
|