mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
feat: add media asset system, channel lifecycle refactor, and chat attachments (#54)
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
DROP TABLE IF EXISTS bot_history_message_assets;
|
||||
DROP TABLE IF EXISTS media_assets;
|
||||
DROP TABLE IF EXISTS bot_storage_bindings;
|
||||
DROP TABLE IF EXISTS storage_providers;
|
||||
DROP TABLE IF EXISTS subagents;
|
||||
DROP TABLE IF EXISTS schedule;
|
||||
DROP TABLE IF EXISTS lifecycle_events;
|
||||
|
||||
@@ -86,7 +86,7 @@ CREATE TABLE IF NOT EXISTS models (
|
||||
name TEXT,
|
||||
llm_provider_id UUID NOT NULL REFERENCES llm_providers(id) ON DELETE CASCADE,
|
||||
dimensions INTEGER,
|
||||
is_multimodal BOOLEAN NOT NULL DEFAULT false,
|
||||
input_modalities TEXT[] NOT NULL DEFAULT ARRAY['text']::TEXT[],
|
||||
type TEXT NOT NULL DEFAULT 'chat',
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
@@ -169,11 +169,10 @@ CREATE TABLE IF NOT EXISTS bot_channel_configs (
|
||||
self_identity JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
routing JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
capabilities JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
status TEXT NOT NULL DEFAULT 'pending',
|
||||
disabled BOOLEAN NOT NULL DEFAULT false,
|
||||
verified_at TIMESTAMPTZ,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT bot_channel_status_check CHECK (status IN ('pending', 'verified', 'disabled')),
|
||||
CONSTRAINT bot_channel_unique UNIQUE (bot_id, channel_type)
|
||||
);
|
||||
|
||||
@@ -343,3 +342,64 @@ CREATE TABLE IF NOT EXISTS subagents (
|
||||
CREATE INDEX IF NOT EXISTS idx_subagents_bot_id ON subagents(bot_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_subagents_deleted ON subagents(deleted);
|
||||
|
||||
-- storage_providers: pluggable object storage backends
|
||||
CREATE TABLE IF NOT EXISTS storage_providers (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name TEXT NOT NULL,
|
||||
provider TEXT NOT NULL,
|
||||
config JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT storage_providers_name_unique UNIQUE (name),
|
||||
CONSTRAINT storage_providers_provider_check CHECK (provider IN ('localfs', 's3', 'gcs'))
|
||||
);
|
||||
|
||||
-- bot_storage_bindings: per-bot storage backend selection
|
||||
CREATE TABLE IF NOT EXISTS bot_storage_bindings (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE,
|
||||
storage_provider_id UUID NOT NULL REFERENCES storage_providers(id) ON DELETE CASCADE,
|
||||
base_path TEXT NOT NULL DEFAULT '',
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT bot_storage_bindings_unique UNIQUE (bot_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_bot_storage_bindings_bot_id ON bot_storage_bindings(bot_id);
|
||||
|
||||
-- media_assets: immutable media objects with dedup by content hash
|
||||
CREATE TABLE IF NOT EXISTS media_assets (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE,
|
||||
storage_provider_id UUID REFERENCES storage_providers(id) ON DELETE SET NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
media_type TEXT NOT NULL,
|
||||
mime TEXT NOT NULL DEFAULT 'application/octet-stream',
|
||||
size_bytes BIGINT NOT NULL DEFAULT 0,
|
||||
storage_key TEXT NOT NULL,
|
||||
original_name TEXT,
|
||||
width INTEGER,
|
||||
height INTEGER,
|
||||
duration_ms BIGINT,
|
||||
metadata JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT media_assets_bot_hash_unique UNIQUE (bot_id, content_hash)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_media_assets_bot_id ON media_assets(bot_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_media_assets_content_hash ON media_assets(content_hash);
|
||||
|
||||
-- bot_history_message_assets: join table linking messages to media assets
|
||||
CREATE TABLE IF NOT EXISTS bot_history_message_assets (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
message_id UUID NOT NULL REFERENCES bot_history_messages(id) ON DELETE CASCADE,
|
||||
asset_id UUID NOT NULL REFERENCES media_assets(id) ON DELETE CASCADE,
|
||||
role TEXT NOT NULL DEFAULT 'attachment',
|
||||
ordinal INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT message_asset_unique UNIQUE (message_id, asset_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_message_assets_message_id ON bot_history_message_assets(message_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_message_assets_asset_id ON bot_history_message_assets(asset_id);
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'bot_channel_configs' AND column_name = 'disabled'
|
||||
) THEN
|
||||
ALTER TABLE bot_channel_configs ADD COLUMN IF NOT EXISTS status TEXT NOT NULL DEFAULT 'verified';
|
||||
UPDATE bot_channel_configs SET status = CASE WHEN disabled THEN 'disabled' ELSE 'verified' END;
|
||||
ALTER TABLE bot_channel_configs DROP COLUMN disabled;
|
||||
ALTER TABLE bot_channel_configs DROP CONSTRAINT IF EXISTS bot_channel_status_check;
|
||||
ALTER TABLE bot_channel_configs ADD CONSTRAINT bot_channel_status_check CHECK (status IN ('pending', 'verified', 'disabled'));
|
||||
END IF;
|
||||
END $$;
|
||||
@@ -0,0 +1,13 @@
|
||||
-- Replace status (TEXT) with disabled (BOOLEAN). Idempotent: no-op when already migrated.
|
||||
DO $$
|
||||
BEGIN
|
||||
IF EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'bot_channel_configs' AND column_name = 'status'
|
||||
) THEN
|
||||
ALTER TABLE bot_channel_configs ADD COLUMN IF NOT EXISTS disabled BOOLEAN NOT NULL DEFAULT false;
|
||||
UPDATE bot_channel_configs SET disabled = (status = 'disabled');
|
||||
ALTER TABLE bot_channel_configs DROP CONSTRAINT IF EXISTS bot_channel_status_check;
|
||||
ALTER TABLE bot_channel_configs DROP COLUMN status;
|
||||
END IF;
|
||||
END $$;
|
||||
@@ -0,0 +1,7 @@
|
||||
ALTER TABLE models ADD COLUMN IF NOT EXISTS is_multimodal BOOLEAN NOT NULL DEFAULT false;
|
||||
|
||||
UPDATE models SET is_multimodal = true WHERE 'image' = ANY(input_modalities);
|
||||
UPDATE models SET is_multimodal = false WHERE NOT ('image' = ANY(input_modalities));
|
||||
|
||||
ALTER TABLE models DROP COLUMN IF EXISTS input_modalities;
|
||||
ALTER TABLE models DROP COLUMN IF EXISTS output_modalities;
|
||||
@@ -0,0 +1,8 @@
|
||||
-- Replace is_multimodal boolean with input modality array.
|
||||
ALTER TABLE models ADD COLUMN IF NOT EXISTS input_modalities TEXT[] NOT NULL DEFAULT ARRAY['text']::TEXT[];
|
||||
|
||||
-- Migrate existing data: true -> ['text','image'], false -> ['text']
|
||||
UPDATE models SET input_modalities = ARRAY['text','image']::TEXT[] WHERE is_multimodal = true;
|
||||
UPDATE models SET input_modalities = ARRAY['text']::TEXT[] WHERE is_multimodal = false;
|
||||
|
||||
ALTER TABLE models DROP COLUMN IF EXISTS is_multimodal;
|
||||
@@ -0,0 +1,4 @@
|
||||
DROP TABLE IF EXISTS bot_history_message_assets;
|
||||
DROP TABLE IF EXISTS media_assets;
|
||||
DROP TABLE IF EXISTS bot_storage_bindings;
|
||||
DROP TABLE IF EXISTS storage_providers;
|
||||
@@ -0,0 +1,60 @@
|
||||
-- storage_providers: pluggable object storage backends
|
||||
CREATE TABLE IF NOT EXISTS storage_providers (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
name TEXT NOT NULL,
|
||||
provider TEXT NOT NULL,
|
||||
config JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT storage_providers_name_unique UNIQUE (name),
|
||||
CONSTRAINT storage_providers_provider_check CHECK (provider IN ('localfs', 's3', 'gcs'))
|
||||
);
|
||||
|
||||
-- bot_storage_bindings: per-bot storage backend selection
|
||||
CREATE TABLE IF NOT EXISTS bot_storage_bindings (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE,
|
||||
storage_provider_id UUID NOT NULL REFERENCES storage_providers(id) ON DELETE CASCADE,
|
||||
base_path TEXT NOT NULL DEFAULT '',
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
updated_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT bot_storage_bindings_unique UNIQUE (bot_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_bot_storage_bindings_bot_id ON bot_storage_bindings(bot_id);
|
||||
|
||||
-- media_assets: immutable media objects with dedup by content hash
|
||||
CREATE TABLE IF NOT EXISTS media_assets (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
bot_id UUID NOT NULL REFERENCES bots(id) ON DELETE CASCADE,
|
||||
storage_provider_id UUID REFERENCES storage_providers(id) ON DELETE SET NULL,
|
||||
content_hash TEXT NOT NULL,
|
||||
media_type TEXT NOT NULL,
|
||||
mime TEXT NOT NULL DEFAULT 'application/octet-stream',
|
||||
size_bytes BIGINT NOT NULL DEFAULT 0,
|
||||
storage_key TEXT NOT NULL,
|
||||
original_name TEXT,
|
||||
width INTEGER,
|
||||
height INTEGER,
|
||||
duration_ms BIGINT,
|
||||
metadata JSONB NOT NULL DEFAULT '{}'::jsonb,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT media_assets_bot_hash_unique UNIQUE (bot_id, content_hash)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_media_assets_bot_id ON media_assets(bot_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_media_assets_content_hash ON media_assets(content_hash);
|
||||
|
||||
-- bot_history_message_assets: join table linking messages to media assets
|
||||
CREATE TABLE IF NOT EXISTS bot_history_message_assets (
|
||||
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
message_id UUID NOT NULL REFERENCES bot_history_messages(id) ON DELETE CASCADE,
|
||||
asset_id UUID NOT NULL REFERENCES media_assets(id) ON DELETE CASCADE,
|
||||
role TEXT NOT NULL DEFAULT 'attachment',
|
||||
ordinal INTEGER NOT NULL DEFAULT 0,
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
|
||||
CONSTRAINT message_asset_unique UNIQUE (message_id, asset_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_message_assets_message_id ON bot_history_message_assets(message_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_message_assets_asset_id ON bot_history_message_assets(asset_id);
|
||||
+18
-6
@@ -1,18 +1,22 @@
|
||||
-- name: DeleteBotChannelConfig :exec
|
||||
DELETE FROM bot_channel_configs
|
||||
WHERE bot_id = $1 AND channel_type = $2;
|
||||
|
||||
-- name: GetBotChannelConfig :one
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, status, verified_at, created_at, updated_at
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at, created_at, updated_at
|
||||
FROM bot_channel_configs
|
||||
WHERE bot_id = $1 AND channel_type = $2
|
||||
LIMIT 1;
|
||||
|
||||
-- name: GetBotChannelConfigByExternalIdentity :one
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, status, verified_at, created_at, updated_at
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at, created_at, updated_at
|
||||
FROM bot_channel_configs
|
||||
WHERE channel_type = $1 AND external_identity = $2
|
||||
LIMIT 1;
|
||||
|
||||
-- name: UpsertBotChannelConfig :one
|
||||
INSERT INTO bot_channel_configs (
|
||||
bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, status, verified_at
|
||||
bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at
|
||||
)
|
||||
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)
|
||||
ON CONFLICT (bot_id, channel_type)
|
||||
@@ -22,13 +26,21 @@ DO UPDATE SET
|
||||
self_identity = EXCLUDED.self_identity,
|
||||
routing = EXCLUDED.routing,
|
||||
capabilities = EXCLUDED.capabilities,
|
||||
status = EXCLUDED.status,
|
||||
disabled = EXCLUDED.disabled,
|
||||
verified_at = EXCLUDED.verified_at,
|
||||
updated_at = now()
|
||||
RETURNING id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, status, verified_at, created_at, updated_at;
|
||||
RETURNING id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at, created_at, updated_at;
|
||||
|
||||
-- name: UpdateBotChannelConfigDisabled :one
|
||||
UPDATE bot_channel_configs
|
||||
SET
|
||||
disabled = $3,
|
||||
updated_at = now()
|
||||
WHERE bot_id = $1 AND channel_type = $2
|
||||
RETURNING id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at, created_at, updated_at;
|
||||
|
||||
-- name: ListBotChannelConfigsByType :many
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, status, verified_at, created_at, updated_at
|
||||
SELECT id, bot_id, channel_type, credentials, external_identity, self_identity, routing, capabilities, disabled, verified_at, created_at, updated_at
|
||||
FROM bot_channel_configs
|
||||
WHERE channel_type = $1
|
||||
ORDER BY created_at DESC;
|
||||
|
||||
@@ -0,0 +1,116 @@
|
||||
-- name: CreateStorageProvider :one
|
||||
INSERT INTO storage_providers (name, provider, config)
|
||||
VALUES (sqlc.arg(name), sqlc.arg(provider), sqlc.arg(config))
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetStorageProviderByID :one
|
||||
SELECT * FROM storage_providers WHERE id = sqlc.arg(id);
|
||||
|
||||
-- name: GetStorageProviderByName :one
|
||||
SELECT * FROM storage_providers WHERE name = sqlc.arg(name);
|
||||
|
||||
-- name: ListStorageProviders :many
|
||||
SELECT * FROM storage_providers ORDER BY created_at DESC;
|
||||
|
||||
-- name: UpsertBotStorageBinding :one
|
||||
INSERT INTO bot_storage_bindings (bot_id, storage_provider_id, base_path)
|
||||
VALUES (sqlc.arg(bot_id), sqlc.arg(storage_provider_id), sqlc.arg(base_path))
|
||||
ON CONFLICT (bot_id) DO UPDATE SET
|
||||
storage_provider_id = EXCLUDED.storage_provider_id,
|
||||
base_path = EXCLUDED.base_path,
|
||||
updated_at = now()
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetBotStorageBinding :one
|
||||
SELECT * FROM bot_storage_bindings WHERE bot_id = sqlc.arg(bot_id);
|
||||
|
||||
-- name: CreateMediaAsset :one
|
||||
INSERT INTO media_assets (
|
||||
bot_id, storage_provider_id, content_hash, media_type, mime,
|
||||
size_bytes, storage_key, original_name, width, height, duration_ms, metadata
|
||||
)
|
||||
VALUES (
|
||||
sqlc.arg(bot_id),
|
||||
sqlc.narg(storage_provider_id)::uuid,
|
||||
sqlc.arg(content_hash),
|
||||
sqlc.arg(media_type),
|
||||
sqlc.arg(mime),
|
||||
sqlc.arg(size_bytes),
|
||||
sqlc.arg(storage_key),
|
||||
sqlc.narg(original_name)::text,
|
||||
sqlc.narg(width)::integer,
|
||||
sqlc.narg(height)::integer,
|
||||
sqlc.narg(duration_ms)::bigint,
|
||||
sqlc.arg(metadata)
|
||||
)
|
||||
ON CONFLICT (bot_id, content_hash) DO UPDATE SET
|
||||
bot_id = media_assets.bot_id
|
||||
RETURNING *;
|
||||
|
||||
-- name: GetMediaAssetByID :one
|
||||
SELECT * FROM media_assets WHERE id = sqlc.arg(id);
|
||||
|
||||
-- name: GetMediaAssetByHash :one
|
||||
SELECT * FROM media_assets
|
||||
WHERE bot_id = sqlc.arg(bot_id) AND content_hash = sqlc.arg(content_hash);
|
||||
|
||||
-- name: ListMediaAssetsByBotID :many
|
||||
SELECT * FROM media_assets
|
||||
WHERE bot_id = sqlc.arg(bot_id)
|
||||
ORDER BY created_at DESC;
|
||||
|
||||
-- name: DeleteMediaAsset :exec
|
||||
DELETE FROM media_assets WHERE id = sqlc.arg(id);
|
||||
|
||||
-- name: CreateMessageAsset :one
|
||||
INSERT INTO bot_history_message_assets (message_id, asset_id, role, ordinal)
|
||||
VALUES (sqlc.arg(message_id), sqlc.arg(asset_id), sqlc.arg(role), sqlc.arg(ordinal))
|
||||
ON CONFLICT (message_id, asset_id) DO UPDATE SET
|
||||
role = EXCLUDED.role,
|
||||
ordinal = EXCLUDED.ordinal
|
||||
RETURNING *;
|
||||
|
||||
-- name: ListMessageAssets :many
|
||||
SELECT
|
||||
ma.id AS rel_id,
|
||||
ma.message_id,
|
||||
ma.asset_id,
|
||||
ma.role,
|
||||
ma.ordinal,
|
||||
a.media_type,
|
||||
a.mime,
|
||||
a.size_bytes,
|
||||
a.storage_key,
|
||||
a.original_name,
|
||||
a.width,
|
||||
a.height,
|
||||
a.duration_ms,
|
||||
a.metadata AS asset_metadata
|
||||
FROM bot_history_message_assets ma
|
||||
JOIN media_assets a ON a.id = ma.asset_id
|
||||
WHERE ma.message_id = sqlc.arg(message_id)
|
||||
ORDER BY ma.ordinal ASC;
|
||||
|
||||
-- name: ListMessageAssetsBatch :many
|
||||
SELECT
|
||||
ma.id AS rel_id,
|
||||
ma.message_id,
|
||||
ma.asset_id,
|
||||
ma.role,
|
||||
ma.ordinal,
|
||||
a.media_type,
|
||||
a.mime,
|
||||
a.size_bytes,
|
||||
a.storage_key,
|
||||
a.original_name,
|
||||
a.width,
|
||||
a.height,
|
||||
a.duration_ms,
|
||||
a.metadata AS asset_metadata
|
||||
FROM bot_history_message_assets ma
|
||||
JOIN media_assets a ON a.id = ma.asset_id
|
||||
WHERE ma.message_id = ANY(sqlc.arg(message_ids)::uuid[])
|
||||
ORDER BY ma.message_id, ma.ordinal ASC;
|
||||
|
||||
-- name: DeleteMessageAssets :exec
|
||||
DELETE FROM bot_history_message_assets WHERE message_id = sqlc.arg(message_id);
|
||||
@@ -46,13 +46,13 @@ SELECT COUNT(*) FROM llm_providers;
|
||||
SELECT COUNT(*) FROM llm_providers WHERE client_type = sqlc.arg(client_type);
|
||||
|
||||
-- name: CreateModel :one
|
||||
INSERT INTO models (model_id, name, llm_provider_id, dimensions, is_multimodal, type)
|
||||
INSERT INTO models (model_id, name, llm_provider_id, dimensions, input_modalities, type)
|
||||
VALUES (
|
||||
sqlc.arg(model_id),
|
||||
sqlc.arg(name),
|
||||
sqlc.arg(llm_provider_id),
|
||||
sqlc.arg(dimensions),
|
||||
sqlc.arg(is_multimodal),
|
||||
sqlc.arg(input_modalities),
|
||||
sqlc.arg(type)
|
||||
)
|
||||
RETURNING *;
|
||||
@@ -95,7 +95,7 @@ SET
|
||||
name = sqlc.arg(name),
|
||||
llm_provider_id = sqlc.arg(llm_provider_id),
|
||||
dimensions = sqlc.arg(dimensions),
|
||||
is_multimodal = sqlc.arg(is_multimodal),
|
||||
input_modalities = sqlc.arg(input_modalities),
|
||||
type = sqlc.arg(type),
|
||||
updated_at = now()
|
||||
WHERE id = sqlc.arg(id)
|
||||
@@ -108,7 +108,7 @@ SET
|
||||
name = sqlc.arg(name),
|
||||
llm_provider_id = sqlc.arg(llm_provider_id),
|
||||
dimensions = sqlc.arg(dimensions),
|
||||
is_multimodal = sqlc.arg(is_multimodal),
|
||||
input_modalities = sqlc.arg(input_modalities),
|
||||
type = sqlc.arg(type),
|
||||
updated_at = now()
|
||||
WHERE model_id = sqlc.arg(model_id)
|
||||
|
||||
Reference in New Issue
Block a user