mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat(models): add image model type support
Add a dedicated image model type so bots can use image API models without overloading chat model capabilities, while keeping existing chat-based image generation selectable.
This commit is contained in:
@@ -92,7 +92,7 @@ CREATE TABLE IF NOT EXISTS models (
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT models_provider_id_model_id_unique UNIQUE (provider_id, model_id),
|
||||
CONSTRAINT models_type_check CHECK (type IN ('chat', 'embedding', 'speech'))
|
||||
CONSTRAINT models_type_check CHECK (type IN ('chat', 'embedding', 'image', 'speech'))
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS model_variants (
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
-- 0067_add_image_model_type (rollback)
|
||||
-- Remove image from the supported model types.
|
||||
ALTER TABLE models DROP CONSTRAINT IF EXISTS models_type_check;
|
||||
|
||||
ALTER TABLE models
|
||||
ADD CONSTRAINT models_type_check
|
||||
CHECK (type IN ('chat', 'embedding', 'speech'));
|
||||
@@ -0,0 +1,7 @@
|
||||
-- 0067_add_image_model_type
|
||||
-- Add image as a supported model type.
|
||||
ALTER TABLE models DROP CONSTRAINT IF EXISTS models_type_check;
|
||||
|
||||
ALTER TABLE models
|
||||
ADD CONSTRAINT models_type_check
|
||||
CHECK (type IN ('chat', 'embedding', 'image', 'speech'));
|
||||
Reference in New Issue
Block a user