Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(backend): Add migrations to fix credentials inputs with invalid provider "llm" (vol. 5)

Reinier van der Leer1e8a272ac67c
diff --git a/autogpt_platform/backend/backend/data/graph.py b/autogpt_platform/backend/backend/data/graph.py
index e9d742c703..4d31086939 100644
--- a/autogpt_platform/backend/backend/data/graph.py
+++ b/autogpt_platform/backend/backend/data/graph.py
@@ -550,10 +550,10 @@ async def fix_llm_provider_credentials():
SELECT "User".id user_id,
node.id node_id,
node."constantInput" node_preset_input
- FROM "AgentNode" node
- LEFT JOIN "AgentGraph" graph
+ FROM platform."AgentNode" node
+ LEFT JOIN platform."AgentGraph" graph
ON node."agentGraphId" = graph.id
- LEFT JOIN "User"
+ LEFT JOIN platform."User" "User"
ON graph."userId" = "User".id
WHERE node."constantInput"::jsonb->'credentials'->>'provider' = 'llm'
ORDER BY user_id;