[fast_inference] Make API Great Again And Again (#923)
* 为fast_inference分支适配新的WebAPI * modified: api_v2.py * 修改文档细节 * modified: api_v2.py * 优化了代码逻辑,提升健壮性 * 修改文档细节 * 修改文档细节 * 优化代码逻辑 * 修改注释细节
This commit is contained in:
@@ -16,6 +16,9 @@ def get_method(name:str)->Callable:
|
||||
raise ValueError(f"Method {name} not found")
|
||||
return method
|
||||
|
||||
def get_method_names()->list:
|
||||
return list(METHODS.keys())
|
||||
|
||||
def register_method(name):
|
||||
def decorator(func):
|
||||
METHODS[name] = func
|
||||
|
||||
Reference in New Issue
Block a user