mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-01 12:33:42 +00:00
- 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.
18 lines
504 B
SQL
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';
|