MCPcopy
hub / github.com/LazyAGI/LazyLLM / append

Method append

lazyllm/common/common.py:111–126  ·  view source on GitHub ↗
(self, x)

Source from the content-addressed store, hash-verified

109 self.kw = kwargs() if kw is arguments._None else copy.copy(kw)
110
111 def append(self, x):
112 args, kw = package(), kwargs()
113 if isinstance(x, package):
114 args = x
115 elif isinstance(x, kwargs):
116 kw = x
117 elif isinstance(x, arguments):
118 args, kw = x.args, x.kw
119 else:
120 args = package((x,))
121 if args: self.args += args
122 if kw:
123 dup_keys = set(self.kw.keys()).intersection(set(kw.keys()))
124 assert len(dup_keys) == 0, f'Duplicated keys: {dup_keys}'
125 self.kw.update(kw)
126 return self
127
128
129builtins.package = package

Callers 15

register_hooksFunction · 0.80
prepare_hooksFunction · 0.80
run_hooksFunction · 0.80
_normalize_param_namesFunction · 0.80
_scan_proxy_membersFunction · 0.80
inject_tool_configFunction · 0.80
_distinct_aggregateMethod · 0.80
searchMethod · 0.80
_authorsFunction · 0.80
meta_searchMethod · 0.80
_normalize_itemsMethod · 0.80

Calls 4

packageClass · 0.85
kwargsClass · 0.85
keysMethod · 0.45
updateMethod · 0.45

Tested by 15

load_resultsMethod · 0.64
_zh_pretrain_bodyFunction · 0.64
warp_into_webMethod · 0.64
warp_into_webMethod · 0.64
warp_into_webMethod · 0.64
validate_test_filesMethod · 0.64
test_filter_by_tagMethod · 0.64
key_fnMethod · 0.64