MCPcopy Index your code
hub / github.com/agent0ai/agent-zero / _args_override

Function _args_override

initialize.py:84–102  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

82 settings.reload_settings()
83
84def _args_override(config):
85 # update config with runtime args
86 for key, value in runtime.args.items():
87 if hasattr(config, key):
88 # conversion based on type of config[key]
89 if isinstance(getattr(config, key), bool):
90 value = value.lower().strip() == "true"
91 elif isinstance(getattr(config, key), int):
92 value = int(value)
93 elif isinstance(getattr(config, key), float):
94 value = float(value)
95 elif isinstance(getattr(config, key), str):
96 value = str(value)
97 else:
98 raise Exception(
99 f"Unsupported argument type of '{key}': {type(getattr(config, key))}"
100 )
101
102 setattr(config, key, value)
103
104
105

Callers 1

initialize_agentFunction · 0.85

Calls 1

typeFunction · 0.85

Tested by

no test coverage detected