mirror of
https://github.com/langgenius/dify.git
synced 2026-04-27 05:58:14 +08:00
fix(1.0): unexpected error raise (#12812)
This commit is contained in:
@ -48,8 +48,10 @@ class PluginToolManager(BasePluginManager):
|
||||
tool_provider_id = GenericProviderID(provider)
|
||||
|
||||
def transformer(json_response: dict[str, Any]) -> dict:
|
||||
for tool in json_response.get("data", {}).get("declaration", {}).get("tools", []):
|
||||
tool["identity"]["provider"] = tool_provider_id.provider_name
|
||||
data = json_response.get("data")
|
||||
if data:
|
||||
for tool in data.get("declaration", {}).get("tools", []):
|
||||
tool["identity"]["provider"] = tool_provider_id.provider_name
|
||||
|
||||
return json_response
|
||||
|
||||
|
||||
Reference in New Issue
Block a user