mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
revert: undo changes to graph.py
Reverting migrate_llm_models modifications per request. Back to dev baseline for this file.
This commit is contained in:
@@ -36,7 +36,7 @@ from backend.util.models import Pagination
|
||||
from backend.util.request import parse_url
|
||||
|
||||
from .block import BlockInput
|
||||
from .db import BaseDbModel, execute_raw_with_schema
|
||||
from .db import BaseDbModel
|
||||
from .db import prisma as db
|
||||
from .db import query_raw_with_schema, transaction
|
||||
from .dynamic_fields import is_tool_pin, sanitize_pin_name
|
||||
@@ -1670,15 +1670,15 @@ async def migrate_llm_models(migrate_to: LlmModel):
|
||||
# Update each block
|
||||
for id, path in llm_model_fields.items():
|
||||
query = f"""
|
||||
UPDATE {{schema_prefix}}"AgentNode"
|
||||
UPDATE platform."AgentNode"
|
||||
SET "constantInput" = jsonb_set("constantInput", $1, to_jsonb($2), true)
|
||||
WHERE "agentBlockId" = $3
|
||||
AND "constantInput" ? ($4)::text
|
||||
AND "constantInput"->>($4)::text NOT IN {escaped_enum_values}
|
||||
"""
|
||||
|
||||
await execute_raw_with_schema(
|
||||
query,
|
||||
await db.execute_raw(
|
||||
query, # type: ignore - is supposed to be LiteralString
|
||||
[path],
|
||||
migrate_to.value,
|
||||
id,
|
||||
|
||||
Reference in New Issue
Block a user