MCPcopy
hub / github.com/algorithmicsuperintelligence/optillm / update

Method update

optillm/plugins/longcepo/utils.py:31–49  ·  view source on GitHub ↗
(self, other=None, **kwargs)

Source from the content-addressed store, hash-verified

29 super().__setitem__(key, value)
30
31 def update(self, other=None, **kwargs):
32 updates = {}
33 if other:
34 if isinstance(other, dict):
35 updates.update(other)
36 else:
37 updates.update(dict(other))
38 updates.update(kwargs)
39
40 for key, value in updates.items():
41 if key not in self.__allowed_keys__:
42 raise KeyError(
43 f"Key '{key}' not allowed. Allowed keys: {self.__allowed_keys__}"
44 )
45 if not isinstance(value, int):
46 raise TypeError(
47 f"Value for '{key}' must be int, got {type(value).__name__}"
48 )
49 self[key] = self.get(key, 0) + value
50
51
52def concurrent_map(

Callers 15

__init__Method · 0.95
query_optillmMethod · 0.80
save_resultsMethod · 0.80
evaluate_modelFunction · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
tearDownMethod · 0.80
proxyFunction · 0.80
mainFunction · 0.80
get_statsMethod · 0.80

Calls

no outgoing calls

Tested by 4

tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64
tearDownMethod · 0.64