Merge branch 'fix/chore-fix' into dev/plugin-deploy

This commit is contained in:
Yeuoly
2024-12-10 00:23:08 +08:00
5 changed files with 72 additions and 8 deletions

View File

@ -18,9 +18,12 @@ class PluginAgentManager(BasePluginManager):
def transformer(json_response: dict[str, Any]) -> dict:
for provider in json_response.get("data", []):
declaration = provider.get("declaration", {}) or {}
declaration["identity"]["name"] = (
f"{provider.get('plugin_id')}/{declaration.get('identity', {}).get('name')}"
)
provider_name = declaration.get("identity", {}).get("name")
for tool in declaration.get("tools", []):
tool["identity"]["provider"] = provider_name
for strategy in declaration.get("strategies", []):
strategy["identity"]["provider"] = provider_name
return json_response

View File

@ -99,9 +99,9 @@ class AgentNode(ToolNode):
Generate parameters based on the given tool parameters, variable pool, and node data.
Args:
tool_parameters (Sequence[ToolParameter]): The list of tool parameters.
agent_parameters (Sequence[AgentParameter]): The list of agent parameters.
variable_pool (VariablePool): The variable pool containing the variables.
node_data (ToolNodeData): The data associated with the tool node.
node_data (AgentNodeData): The data associated with the agent node.
Returns:
Mapping[str, Any]: A dictionary containing the generated parameters.