MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / build

Method build

plugin/app/models/bundle.py:25–41  ·  view source on GitHub ↗

Build a Bundle object :param bundle_dict: the dictionary of the bundle :param i18n: the i18n dictionary (language code: {key: value}) :return: a Bundle object

(cls, bundle_dict: Dict)

Source from the content-addressed store, hash-verified

23
24 @classmethod
25 def build(cls, bundle_dict: Dict):
26 """
27 Build a Bundle object
28 :param bundle_dict: the dictionary of the bundle
29 :param i18n: the i18n dictionary (language code: {key: value})
30 :return: a Bundle object
31 """
32 bundle_id = bundle_dict["id"]
33 return cls(
34 bundle_id=bundle_id,
35 provider=bundle_dict["provider"],
36 developer=bundle_dict["developer"],
37 name=bundle_dict["name"],
38 description=bundle_dict["description"],
39 credentials_schema=bundle_dict.get("credentials_schema", {}),
40 icon_url=f"{CONFIG.ICON_URL_PREFIX}/images/plugins/bundles/icons/{bundle_id}.png"
41 )
42
43 def to_dict(self, lang: str):
44 credentials_schema_dict = {

Callers 2

load_bundle_dataFunction · 0.45
load_plugin_dataFunction · 0.45

Calls 1

getMethod · 0.45

Tested by

no test coverage detected