- Added `transcription_service.py` to handle audio transcription via Whisper API. - Integrated logging for transcription processes and error handling. - Supported audio format checks based on configuration settings. docs: Create Ordre System Implementation Plan - Drafted comprehensive implementation plan for e-conomic order integration. - Outlined business requirements, database changes, backend and frontend implementation details. - Included testing plan and deployment steps for the new order system. feat: Add AI prompts and regex action capabilities - Created `ai_prompts` table for storing custom AI prompts. - Added regex extraction and linking action to email workflow actions. feat: Introduce conversations module for transcribed audio - Created `conversations` table to store transcribed conversations with relevant metadata. - Added indexing for customer, ticket, and user linkage. - Implemented full-text search capabilities for Danish language. fix: Add category column to conversations for classification - Added `category` column to `conversations` table for better conversation classification.
31 lines
1.4 KiB
SQL
31 lines
1.4 KiB
SQL
-- Add Regex Extract and Link Action
|
|
-- Allows configurable regex extraction and database linking workflows
|
|
|
|
INSERT INTO email_workflow_actions (action_code, name, description, category, parameter_schema, example_config)
|
|
VALUES (
|
|
'regex_extract_and_link',
|
|
'Regex Ekstrahering & Linking',
|
|
'Søg efter mønstre (Regex) og link email til database matches',
|
|
'linking',
|
|
'{
|
|
"type": "object",
|
|
"properties": {
|
|
"regex_pattern": {"type": "string", "title": "Regex Pattern (med 1 gruppe)"},
|
|
"target_table": {"type": "string", "enum": ["customers", "vendors", "users"], "title": "Tabel"},
|
|
"target_column": {"type": "string", "title": "Søge Kolonne"},
|
|
"link_column": {"type": "string", "title": "Link Kolonne i Email", "default": "customer_id"},
|
|
"value_column": {"type": "string", "title": "Værdi Kolonne", "default": "id"},
|
|
"on_match": {"type": "string", "enum": ["update_email", "none"], "default": "update_email", "title": "Handling"}
|
|
},
|
|
"required": ["regex_pattern", "target_table", "target_column"]
|
|
}',
|
|
'{
|
|
"regex_pattern": "CVR-nr\\.?:?\\s*(\\d{8})",
|
|
"target_table": "customers",
|
|
"target_column": "cvr_number",
|
|
"link_column": "customer_id",
|
|
"value_column": "id",
|
|
"on_match": "update_email"
|
|
}'
|
|
) ON CONFLICT (action_code) DO NOTHING;
|