mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
17cd077f34
* feat: add thinking support * feat: improve thinking block render in web and filter thinking content in channels * fix: migrate
18 lines
630 B
SQL
18 lines
630 B
SQL
-- 0014_reasoning
|
|
-- Add reasoning support flag to models and reasoning settings to bots.
|
|
|
|
ALTER TABLE models ADD COLUMN IF NOT EXISTS supports_reasoning BOOLEAN NOT NULL DEFAULT false;
|
|
|
|
ALTER TABLE bots ADD COLUMN IF NOT EXISTS reasoning_enabled BOOLEAN NOT NULL DEFAULT false;
|
|
ALTER TABLE bots ADD COLUMN IF NOT EXISTS reasoning_effort TEXT NOT NULL DEFAULT 'medium';
|
|
DO $$
|
|
BEGIN
|
|
IF NOT EXISTS (
|
|
SELECT 1 FROM pg_constraint WHERE conname = 'bots_reasoning_effort_check'
|
|
) THEN
|
|
ALTER TABLE bots ADD CONSTRAINT bots_reasoning_effort_check
|
|
CHECK (reasoning_effort IN ('low', 'medium', 'high'));
|
|
END IF;
|
|
END
|
|
$$;
|