mirror of
https://github.com/langgenius/dify.git
synced 2026-04-25 09:36:40 +08:00
Merge branch 'fix/chore-fix' into dev/plugin-deploy
This commit is contained in:
commit
cd00602213
@ -48,6 +48,10 @@ class PluginAgentManager(BasePluginManager):
|
|||||||
agent_provider_id = GenericProviderID(provider)
|
agent_provider_id = GenericProviderID(provider)
|
||||||
|
|
||||||
def transformer(json_response: dict[str, Any]) -> dict:
|
def transformer(json_response: dict[str, Any]) -> dict:
|
||||||
|
# skip if error occurs
|
||||||
|
if json_response.get("data") is None or json_response.get("data", {}).get("declaration") is None:
|
||||||
|
return json_response
|
||||||
|
|
||||||
for strategy in json_response.get("data", {}).get("declaration", {}).get("strategies", []):
|
for strategy in json_response.get("data", {}).get("declaration", {}).get("strategies", []):
|
||||||
strategy["identity"]["provider"] = agent_provider_id.provider_name
|
strategy["identity"]["provider"] = agent_provider_id.provider_name
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user