MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / try_run_task

Function try_run_task

bmtools/tools/hugging_tools/api.py:114–122  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

112 ''' % func.__name__
113 @wraps(func)
114 def try_run_task(*args, **kwargs):
115 try:
116 return func(*args, **kwargs)
117 except RepositoryNotFoundError as e:
118 return '''The model with model_id you input is not available. Plese check the model_docs to get other available models:
119 Action: model_docs
120 Action Input: {"task" : "%s"}
121 After that you can choose an available models in the list.
122 '''
123 path = "/" + func.__name__
124 try_run_task.route = path
125 task_list.append(func.__name__)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected