Files
libredesk/internal/ai/queries.sql
Abhinav Raut 3f7d151d33 - add getting started flow for new users
- Translate web template pass i18n dependency
- Fix colors in menu card
- Show update description if avaialble in AppUpdate component
- Remvoe i18n from settings as i18n and settings depend on each other to load initial lang.
- Clear inbox password as the update SQL query now returns the config.
- Fetch agents and inboxes from the store instead of directly fetching using axios instance.
2025-08-30 21:30:24 +05:30

18 lines
504 B
SQL

-- name: get-default-provider
SELECT id, name, provider, config, is_default FROM ai_providers where is_default is true;
-- name: get-prompt
SELECT id, created_at, updated_at, key, title, content FROM ai_prompts where key = $1;
-- name: get-prompts
SELECT id, created_at, updated_at, key, title FROM ai_prompts order by title;
-- name: set-openai-key
UPDATE ai_providers
SET config = jsonb_set(
COALESCE(config, '{}'::jsonb),
'{api_key}',
to_jsonb($1::text)
)
WHERE provider = 'openai';