MCPcopy Index your code
hub / github.com/modelscope/modelscope / load_from_prebuilt

Function load_from_prebuilt

modelscope/utils/ast_utils.py:764–772  ·  view source on GitHub ↗
(file_path=None)

Source from the content-addressed store, hash-verified

762
763
764def load_from_prebuilt(file_path=None):
765 if file_path is None:
766 local_path = p.resolve().parents[0]
767 file_path = os.path.join(local_path, TEMPLATE_FILE)
768 if os.path.exists(file_path):
769 index = _load_index(file_path, with_template=True)
770 else:
771 index = generate_ast_template()
772 return index
773
774
775def generate_ast_template(file_path=None, force_rebuild=True):

Callers 2

load_indexFunction · 0.85

Calls 3

_load_indexFunction · 0.85
generate_ast_templateFunction · 0.85
existsMethod · 0.45

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…