Files

16 lines
590 B
Python
Raw Permalink Normal View History

"""补挂:心法/钩子/跨稿质检 挂接训练营框架库(6)"""
import sys
sys.path.insert(0, r'C:\Users\xinmiclaw\Desktop\雅文内容创造工作台\server')
from sqlmodel import Session, select
from app.db import engine
from app.models import Agent
with Session(engine) as s:
for a in s.exec(select(Agent)).all():
if a.name in ("心法段 Agent", "钩子段 Agent", "跨稿质检") and 6 not in (a.kb_ids or []):
a.kb_ids = (a.kb_ids or []) + [6]
s.add(a)
print(f"{a.name} kb_ids → {a.kb_ids}")
s.commit()
print("完成")