[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:
ChasonJiang
2024-04-06 21:07:59 +08:00
committed by GitHub
parent 72c0eca0a2
commit ec7647e08d
3 changed files with 447 additions and 0 deletions

View File

@@ -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