fixed reasoning

This commit is contained in:
2026-06-10 13:11:15 +03:00
parent 07e9ef6e04
commit 320f7c7195
6 changed files with 137 additions and 14 deletions
+6
View File
@@ -21,6 +21,12 @@ def run_migrations() -> None:
)
)
if "messages" in inspector.get_table_names():
columns = {col["name"] for col in inspector.get_columns("messages")}
with engine.begin() as conn:
if "reasoning_json" not in columns:
conn.execute(text("ALTER TABLE messages ADD COLUMN reasoning_json TEXT"))
if "pomodoro_cycles" not in inspector.get_table_names():
return
+1
View File
@@ -29,6 +29,7 @@ class Message(Base):
role: Mapped[str] = mapped_column(String(32))
content: Mapped[str] = mapped_column(Text, default="")
tool_calls_json: Mapped[str | None] = mapped_column(Text, nullable=True)
reasoning_json: Mapped[str | None] = mapped_column(Text, nullable=True)
tool_call_id: Mapped[str | None] = mapped_column(String(64), nullable=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())