You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
363 B
Python

from agentkit.types import PluginConfigParam
def create_plugin_params(input_params: dict, param_def: list[PluginConfigParam]) -> dict:
params = {}
for param in param_def:
if param["id"] in input_params:
params[param["id"]] = input_params[param["id"]]
else:
params[param["id"]] = param["default"]
return params