fixed reasoning
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user