hazo_llm_api 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/config/hazo_llm_api_config.ini +216 -0
- package/dist/lib/database/init_database.d.ts +6 -6
- package/dist/lib/database/init_database.d.ts.map +1 -1
- package/dist/lib/database/init_database.js +107 -63
- package/dist/lib/database/init_database.js.map +1 -1
- package/dist/lib/database/utils.d.ts +12 -10
- package/dist/lib/database/utils.d.ts.map +1 -1
- package/dist/lib/database/utils.js +19 -13
- package/dist/lib/database/utils.js.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/llm_api/hazo_llm_document_text.d.ts +20 -0
- package/dist/lib/llm_api/hazo_llm_document_text.d.ts.map +1 -0
- package/dist/lib/llm_api/hazo_llm_document_text.js +92 -0
- package/dist/lib/llm_api/hazo_llm_document_text.js.map +1 -0
- package/dist/lib/llm_api/index.d.ts +23 -2
- package/dist/lib/llm_api/index.d.ts.map +1 -1
- package/dist/lib/llm_api/index.js +35 -0
- package/dist/lib/llm_api/index.js.map +1 -1
- package/dist/lib/llm_api/types.d.ts +31 -4
- package/dist/lib/llm_api/types.d.ts.map +1 -1
- package/dist/lib/llm_api/types.js.map +1 -1
- package/dist/lib/prompts/get_prompt.d.ts +4 -4
- package/dist/lib/prompts/get_prompt.d.ts.map +1 -1
- package/dist/lib/prompts/get_prompt.js +24 -24
- package/dist/lib/prompts/get_prompt.js.map +1 -1
- package/dist/lib/prompts/index.d.ts +1 -1
- package/dist/lib/prompts/index.d.ts.map +1 -1
- package/dist/lib/prompts/index.js +1 -1
- package/dist/lib/prompts/index.js.map +1 -1
- package/dist/lib/prompts/prompt_cache.d.ts +6 -6
- package/dist/lib/prompts/prompt_cache.d.ts.map +1 -1
- package/dist/lib/prompts/prompt_cache.js +9 -9
- package/dist/lib/prompts/prompt_cache.js.map +1 -1
- package/dist/lib/providers/gemini/gemini_provider.d.ts +16 -1
- package/dist/lib/providers/gemini/gemini_provider.d.ts.map +1 -1
- package/dist/lib/providers/gemini/gemini_provider.js +45 -0
- package/dist/lib/providers/gemini/gemini_provider.js.map +1 -1
- package/dist/lib/providers/qwen/qwen_provider.d.ts +14 -1
- package/dist/lib/providers/qwen/qwen_provider.d.ts.map +1 -1
- package/dist/lib/providers/qwen/qwen_provider.js +33 -0
- package/dist/lib/providers/qwen/qwen_provider.js.map +1 -1
- package/dist/lib/providers/types.d.ts +11 -1
- package/dist/lib/providers/types.d.ts.map +1 -1
- package/dist/lib/providers/types.js +1 -0
- package/dist/lib/providers/types.js.map +1 -1
- package/dist/server.d.ts +4 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/package.json +3 -2
- package/techdoc.md +184 -0
package/README.md
CHANGED
|
@@ -439,6 +439,130 @@ const response = await hazo_llm_text_text({
|
|
|
439
439
|
});
|
|
440
440
|
```
|
|
441
441
|
|
|
442
|
+
### Prompt Import/Export Format
|
|
443
|
+
|
|
444
|
+
The test application supports bulk import/export of prompts via JSON files. This enables backup, migration, and sharing of prompt libraries.
|
|
445
|
+
|
|
446
|
+
#### Export Format
|
|
447
|
+
|
|
448
|
+
When exporting prompts, the JSON file follows this structure:
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"version": "1.0",
|
|
453
|
+
"exported_at": "2024-01-15T10:30:00.000Z",
|
|
454
|
+
"prompts": [
|
|
455
|
+
{
|
|
456
|
+
"prompt_area": "marketing",
|
|
457
|
+
"prompt_key": "greeting",
|
|
458
|
+
"local_1": null,
|
|
459
|
+
"local_2": null,
|
|
460
|
+
"local_3": null,
|
|
461
|
+
"user_id": null,
|
|
462
|
+
"scope_id": null,
|
|
463
|
+
"prompt_text": "Hello {{name}}, welcome to {{service}}.",
|
|
464
|
+
"prompt_variables": [
|
|
465
|
+
{ "name": "name", "description": "Customer name" },
|
|
466
|
+
{ "name": "service", "description": "Service name" }
|
|
467
|
+
],
|
|
468
|
+
"prompt_notes": "Standard greeting for marketing emails"
|
|
469
|
+
}
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
#### Required Fields for Import
|
|
475
|
+
|
|
476
|
+
| Field | Type | Required | Description |
|
|
477
|
+
|-------|------|----------|-------------|
|
|
478
|
+
| `prompt_area` | string | Yes | Category/area for the prompt |
|
|
479
|
+
| `prompt_key` | string | Yes | Unique key within the area |
|
|
480
|
+
| `prompt_text` | string | Yes | The prompt template text |
|
|
481
|
+
| `local_1` | string \| null | No | Local filter 1 (e.g., region) |
|
|
482
|
+
| `local_2` | string \| null | No | Local filter 2 (e.g., department) |
|
|
483
|
+
| `local_3` | string \| null | No | Local filter 3 (e.g., sub-category) |
|
|
484
|
+
| `user_id` | string \| null | No | User-specific identifier |
|
|
485
|
+
| `scope_id` | string \| null | No | Scope-specific identifier |
|
|
486
|
+
| `prompt_variables` | array | No | Array of `{ name, description }` objects |
|
|
487
|
+
| `prompt_notes` | string | No | Documentation/notes for the prompt |
|
|
488
|
+
|
|
489
|
+
#### Import Behavior
|
|
490
|
+
|
|
491
|
+
- Each imported prompt receives a new UUID automatically
|
|
492
|
+
- `created_at` is set to the import timestamp
|
|
493
|
+
- `changed_at` is set to the import timestamp
|
|
494
|
+
- Duplicate `prompt_area`/`prompt_key` combinations create new entries (no automatic deduplication)
|
|
495
|
+
- Invalid prompts (missing required fields) are skipped with errors reported
|
|
496
|
+
|
|
497
|
+
#### Bulk Operations UI
|
|
498
|
+
|
|
499
|
+
The test application's Prompt Configuration page (`/prompt-config`) provides a user interface for bulk operations:
|
|
500
|
+
|
|
501
|
+
**Selection:**
|
|
502
|
+
- Individual row selection via checkbox
|
|
503
|
+
- Select all/deselect all checkbox in table header
|
|
504
|
+
- Visual indication of selected rows
|
|
505
|
+
|
|
506
|
+
**Export:**
|
|
507
|
+
1. Select one or more prompts using checkboxes
|
|
508
|
+
2. Click "Export" button (Download icon)
|
|
509
|
+
3. JSON file downloads automatically with filename: `prompts_export_YYYY-MM-DD.json`
|
|
510
|
+
|
|
511
|
+
**Import:**
|
|
512
|
+
1. Click "Import" button (Upload icon)
|
|
513
|
+
2. Select a JSON file matching the export format
|
|
514
|
+
3. Prompts are validated and imported automatically
|
|
515
|
+
4. Success/error messages display import results
|
|
516
|
+
|
|
517
|
+
**Delete:**
|
|
518
|
+
1. Select one or more prompts using checkboxes
|
|
519
|
+
2. Click "Delete Selected" button
|
|
520
|
+
3. Confirm deletion in dialog
|
|
521
|
+
4. Selected prompts are removed permanently
|
|
522
|
+
|
|
523
|
+
#### API Endpoints
|
|
524
|
+
|
|
525
|
+
The test application provides bulk operation endpoints:
|
|
526
|
+
|
|
527
|
+
| Method | Endpoint | Description |
|
|
528
|
+
|--------|----------|-------------|
|
|
529
|
+
| `POST` | `/api/prompts/bulk` | Import prompts from JSON |
|
|
530
|
+
| `DELETE` | `/api/prompts/bulk` | Delete multiple prompts by ID |
|
|
531
|
+
|
|
532
|
+
**Import Request:**
|
|
533
|
+
```json
|
|
534
|
+
{
|
|
535
|
+
"prompts": [
|
|
536
|
+
{ "prompt_area": "...", "prompt_key": "...", "prompt_text": "..." }
|
|
537
|
+
]
|
|
538
|
+
}
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
**Import Response:**
|
|
542
|
+
```json
|
|
543
|
+
{
|
|
544
|
+
"success": true,
|
|
545
|
+
"imported_count": 5,
|
|
546
|
+
"errors": ["Optional array of error messages for failed imports"]
|
|
547
|
+
}
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
**Delete Request:**
|
|
551
|
+
```json
|
|
552
|
+
{
|
|
553
|
+
"ids": ["uuid-1", "uuid-2", "uuid-3"]
|
|
554
|
+
}
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
**Delete Response:**
|
|
558
|
+
```json
|
|
559
|
+
{
|
|
560
|
+
"success": true,
|
|
561
|
+
"deleted_count": 3,
|
|
562
|
+
"errors": ["Optional array of error messages for failed deletions"]
|
|
563
|
+
}
|
|
564
|
+
```
|
|
565
|
+
|
|
442
566
|
## Server-Side Only
|
|
443
567
|
|
|
444
568
|
**Important**: All LLM API functions must be used server-side only.
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# Configuration file for hazo_llm_api package
|
|
2
|
+
# All configurable values should be stored here
|
|
3
|
+
|
|
4
|
+
[logging]
|
|
5
|
+
# Log file path for winston logging
|
|
6
|
+
logfile=logs/hazo_llm_api.log
|
|
7
|
+
|
|
8
|
+
[package]
|
|
9
|
+
# Package build configuration
|
|
10
|
+
build_dir=dist
|
|
11
|
+
source_dir=src
|
|
12
|
+
|
|
13
|
+
[test_app]
|
|
14
|
+
# Test application configuration
|
|
15
|
+
port=3000
|
|
16
|
+
host=localhost
|
|
17
|
+
|
|
18
|
+
[ui]
|
|
19
|
+
# UI component defaults
|
|
20
|
+
default_theme=light
|
|
21
|
+
sidebar_width=256
|
|
22
|
+
|
|
23
|
+
[llm]
|
|
24
|
+
# LLM API global configuration
|
|
25
|
+
# Comma-separated list of enabled LLM providers (e.g., gemini,openai)
|
|
26
|
+
# Or JSON array format: ["gemini", "openai"]
|
|
27
|
+
enabled_llms=["gemini", "qwen"]
|
|
28
|
+
# Primary/default LLM to use when not specified in function calls
|
|
29
|
+
primary_llm=gemini
|
|
30
|
+
# SQLite database path relative to app root
|
|
31
|
+
sqlite_path=prompt_library.sqlite
|
|
32
|
+
|
|
33
|
+
# =============================================================================
|
|
34
|
+
# DEPRECATED: Legacy sections below kept for backward compatibility
|
|
35
|
+
# Migrate to new [llm_gemini] section below
|
|
36
|
+
# =============================================================================
|
|
37
|
+
; [gemini]
|
|
38
|
+
; # Legacy: Gemini API configuration - MIGRATED to [llm_gemini] section below
|
|
39
|
+
; api_url=https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent
|
|
40
|
+
; api_url_image=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent
|
|
41
|
+
|
|
42
|
+
; [gemini_text_api]
|
|
43
|
+
; # Legacy: Gemini Text API generation configuration - MIGRATED to [llm_gemini] section below
|
|
44
|
+
|
|
45
|
+
; [gemini_image_api]
|
|
46
|
+
; # Legacy: Gemini Image API generation configuration - MIGRATED to [llm_gemini] section below
|
|
47
|
+
|
|
48
|
+
[llm_gemini]
|
|
49
|
+
# Gemini Provider Configuration
|
|
50
|
+
# Note: API key must be in .env.local as GEMINI_API_KEY (not in config for security)
|
|
51
|
+
# Base API URL for text generation
|
|
52
|
+
api_url=https://generativelanguage.googleapis.com/v1/models/gemini-2.5-flash:generateContent
|
|
53
|
+
# API URL for image generation (optional, uses api_url if not set)
|
|
54
|
+
api_url_image=https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash-image:generateContent
|
|
55
|
+
; api_url_image=https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent
|
|
56
|
+
# Per-service model configuration (optional, uses model in URL if not specified)
|
|
57
|
+
# Model for text_text service
|
|
58
|
+
; model_text_text=gemini-2.5-flash
|
|
59
|
+
# Model for image_text service
|
|
60
|
+
; model_image_text=gemini-2.5-flash
|
|
61
|
+
# Model for text_image service
|
|
62
|
+
; model_text_image=gemini-2.5-flash-image
|
|
63
|
+
# Model for image_image service
|
|
64
|
+
; model_image_image=gemini-2.5-flash-image
|
|
65
|
+
# Model for document_text service (PDF analysis)
|
|
66
|
+
; model_document_text=gemini-2.5-flash
|
|
67
|
+
# Capabilities this provider supports (JSON array)
|
|
68
|
+
# Options: text_text, image_text, text_image, image_image, document_text
|
|
69
|
+
capabilities=["text_text", "image_text", "text_image", "image_image", "document_text"]
|
|
70
|
+
# Generation config for text API calls
|
|
71
|
+
# These parameters are optional - only include them in API calls if uncommented
|
|
72
|
+
#
|
|
73
|
+
# temperature - Controls randomness in output (0.0-2.0)
|
|
74
|
+
# Lower values = more deterministic, higher values = more creative
|
|
75
|
+
; text_temperature=0.7
|
|
76
|
+
#
|
|
77
|
+
# maxOutputTokens - Maximum number of tokens in the response
|
|
78
|
+
# Limits response length to control costs and output size
|
|
79
|
+
; text_maxOutputTokens=1024
|
|
80
|
+
#
|
|
81
|
+
# topP - Nucleus sampling probability (0.0-1.0)
|
|
82
|
+
# Considers tokens with cumulative probability up to topP
|
|
83
|
+
; text_topP=0.95
|
|
84
|
+
#
|
|
85
|
+
# topK - Top-k sampling
|
|
86
|
+
# Considers only the top K most probable tokens
|
|
87
|
+
; text_topK=40
|
|
88
|
+
#
|
|
89
|
+
# candidateCount - Number of response candidates to generate
|
|
90
|
+
# Returns multiple alternative responses (1-8)
|
|
91
|
+
; text_candidateCount=1
|
|
92
|
+
#
|
|
93
|
+
# stopSequences - JSON array of sequences that stop generation
|
|
94
|
+
# Generation stops when any of these sequences is encountered
|
|
95
|
+
; text_stopSequences=["###END"]
|
|
96
|
+
#
|
|
97
|
+
# responseMimeType - Format of the response
|
|
98
|
+
# Options: text/plain, application/json
|
|
99
|
+
; text_responseMimeType=text/plain
|
|
100
|
+
# Generation config for image API calls (text_image, image_image, image_text)
|
|
101
|
+
# These parameters are optional - only include them in API calls if uncommented
|
|
102
|
+
#
|
|
103
|
+
# temperature - Controls randomness in output (0.0-2.0)
|
|
104
|
+
# For image analysis, lower values (0.3-0.5) typically provide more accurate descriptions
|
|
105
|
+
image_temperature=0.1
|
|
106
|
+
#
|
|
107
|
+
# maxOutputTokens - Maximum number of tokens in the response
|
|
108
|
+
# For image descriptions, 300-500 is usually sufficient
|
|
109
|
+
; image_maxOutputTokens=300
|
|
110
|
+
#
|
|
111
|
+
# topP - Nucleus sampling probability (0.0-1.0)
|
|
112
|
+
# Considers tokens with cumulative probability up to topP
|
|
113
|
+
; image_topP=0.8
|
|
114
|
+
#
|
|
115
|
+
# topK - Top-k sampling
|
|
116
|
+
# Considers only the top K most probable tokens
|
|
117
|
+
; image_topK=20
|
|
118
|
+
#
|
|
119
|
+
# candidateCount - Number of response candidates to generate
|
|
120
|
+
# Returns multiple alternative responses (1-8)
|
|
121
|
+
; image_candidateCount=1
|
|
122
|
+
#
|
|
123
|
+
# stopSequences - JSON array of sequences that stop generation
|
|
124
|
+
# Generation stops when any of these sequences is encountered
|
|
125
|
+
; image_stopSequences=["###END"]
|
|
126
|
+
#
|
|
127
|
+
# responseMimeType - Format of the response
|
|
128
|
+
# Options: text/plain, application/json
|
|
129
|
+
; image_responseMimeType=text/plain
|
|
130
|
+
|
|
131
|
+
[llm_qwen]
|
|
132
|
+
# Qwen Provider Configuration
|
|
133
|
+
# Note: API key must be in .env.local as QWEN_API_KEY (not in config for security)
|
|
134
|
+
# Base API URL (default: DashScope endpoint)
|
|
135
|
+
# Used as fallback if service-specific URLs are not configured
|
|
136
|
+
api_url=https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions
|
|
137
|
+
# Per-service model configuration (required for each service you want to use)
|
|
138
|
+
# Model for text_text service (e.g., qwen-max, qwen-plus)
|
|
139
|
+
model_text_text=qwen-max
|
|
140
|
+
# Model for image_text service (e.g., qwen-vl-max, qwen-vl-plus)
|
|
141
|
+
model_image_text=qwen-vl-max
|
|
142
|
+
model_text_image=qwen-image
|
|
143
|
+
; model_image_image=qwen-image-edit
|
|
144
|
+
model_image_image=qwen-image-edit-plus
|
|
145
|
+
# Model for text_image service (if supported)
|
|
146
|
+
; model_text_image=qwen-vl-max
|
|
147
|
+
# Model for image_image service (if supported)
|
|
148
|
+
; model_image_image=qwen-vl-max
|
|
149
|
+
# Per-service API URL configuration (optional, uses api_url if not specified)
|
|
150
|
+
# API URL for text_text service
|
|
151
|
+
; api_url_text_text=https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions
|
|
152
|
+
# API URL for image_text service
|
|
153
|
+
; api_url_image_text=https://dashscope-intl.aliyuncs.com/compatible-mode/v1/chat/completions
|
|
154
|
+
# API URL for text_image service (image generation)
|
|
155
|
+
; api_url_text_image=https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
|
|
156
|
+
# API URL for image_image service (image editing)
|
|
157
|
+
# Try multimodal generation endpoint for qwen-image-edit
|
|
158
|
+
api_url_image_image=https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/multimodal-generation/generation
|
|
159
|
+
# Capabilities this provider supports (JSON array)
|
|
160
|
+
# Options: text_text, image_text, text_image, image_image
|
|
161
|
+
# Note: Qwen typically supports text_text and image_text, image generation/transformation may not be available
|
|
162
|
+
capabilities=["text_text", "image_text", "text_image", "image_image"]
|
|
163
|
+
# Default system instruction (optional)
|
|
164
|
+
; system_instruction=You are a helpful and friendly assistant.
|
|
165
|
+
# Generation config for text API calls
|
|
166
|
+
# These parameters are optional - only include them in API calls if uncommented
|
|
167
|
+
#
|
|
168
|
+
# temperature - Controls randomness in output (0.0-2.0)
|
|
169
|
+
# Lower values = more deterministic, higher values = more creative
|
|
170
|
+
; text_temperature=0.8
|
|
171
|
+
#
|
|
172
|
+
# max_tokens - Maximum number of tokens in the response
|
|
173
|
+
# Limits response length to control costs and output size
|
|
174
|
+
; text_max_tokens=1024
|
|
175
|
+
#
|
|
176
|
+
# top_p - Nucleus sampling probability (0.0-1.0)
|
|
177
|
+
# Considers tokens with cumulative probability up to top_p
|
|
178
|
+
; text_top_p=0.95
|
|
179
|
+
#
|
|
180
|
+
# top_k - Top-k sampling
|
|
181
|
+
# Considers only the top K most probable tokens
|
|
182
|
+
; text_top_k=40
|
|
183
|
+
#
|
|
184
|
+
# stop - JSON array of sequences that stop generation
|
|
185
|
+
# Generation stops when any of these sequences is encountered
|
|
186
|
+
; text_stop=["###END"]
|
|
187
|
+
# Generation config for image API calls (image_text, text_image, image_image)
|
|
188
|
+
# These parameters are optional - only include them in API calls if uncommented
|
|
189
|
+
#
|
|
190
|
+
# temperature - Controls randomness in output (0.0-2.0)
|
|
191
|
+
# For image analysis, lower values (0.3-0.5) typically provide more accurate descriptions
|
|
192
|
+
; image_temperature=0.4
|
|
193
|
+
#
|
|
194
|
+
# max_tokens - Maximum number of tokens in the response
|
|
195
|
+
# For image descriptions, 300-500 is usually sufficient
|
|
196
|
+
; image_max_tokens=500
|
|
197
|
+
#
|
|
198
|
+
# top_p - Nucleus sampling probability (0.0-1.0)
|
|
199
|
+
# Considers tokens with cumulative probability up to top_p
|
|
200
|
+
; image_top_p=0.8
|
|
201
|
+
#
|
|
202
|
+
# top_k - Top-k sampling
|
|
203
|
+
# Considers only the top K most probable tokens
|
|
204
|
+
; image_top_k=20
|
|
205
|
+
#
|
|
206
|
+
# stop - JSON array of sequences that stop generation
|
|
207
|
+
# Generation stops when any of these sequences is encountered
|
|
208
|
+
; image_stop=["###END"]
|
|
209
|
+
|
|
210
|
+
[database]
|
|
211
|
+
# Database configuration
|
|
212
|
+
# Enable WAL mode for better SQLite performance
|
|
213
|
+
wal_mode=true
|
|
214
|
+
# Table name for prompts
|
|
215
|
+
prompts_table=prompts_library
|
|
216
|
+
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Initializes and manages the SQLite database for prompt storage.
|
|
5
5
|
* Uses sql.js for database operations (pure JavaScript SQLite).
|
|
6
|
-
* Creates the
|
|
6
|
+
* Creates the hazo_prompts table if it doesn't exist.
|
|
7
7
|
*/
|
|
8
8
|
import { Database as SqlJsDatabase } from 'sql.js';
|
|
9
9
|
import type { Logger, PromptRecord } from '../llm_api/types.js';
|
|
@@ -97,22 +97,22 @@ export declare function close_database(logger: Logger): void;
|
|
|
97
97
|
* @param logger - Logger instance
|
|
98
98
|
* @returns The inserted prompt record
|
|
99
99
|
*/
|
|
100
|
-
export declare function insert_prompt(db: SqlJsDatabase, prompt: Omit<PromptRecord, '
|
|
100
|
+
export declare function insert_prompt(db: SqlJsDatabase, prompt: Omit<PromptRecord, 'id' | 'created_at' | 'changed_at'>, logger: Logger): PromptRecord;
|
|
101
101
|
/**
|
|
102
102
|
* Update an existing prompt in the database
|
|
103
103
|
* @param db - Database instance
|
|
104
|
-
* @param
|
|
104
|
+
* @param id - ID (UUID) of the prompt to update
|
|
105
105
|
* @param updates - Fields to update
|
|
106
106
|
* @param logger - Logger instance
|
|
107
107
|
* @returns The updated prompt record
|
|
108
108
|
*/
|
|
109
|
-
export declare function update_prompt(db: SqlJsDatabase,
|
|
109
|
+
export declare function update_prompt(db: SqlJsDatabase, id: string, updates: Partial<Omit<PromptRecord, 'id' | 'created_at' | 'changed_at'>>, logger: Logger): PromptRecord | null;
|
|
110
110
|
/**
|
|
111
111
|
* Delete a prompt from the database
|
|
112
112
|
* @param db - Database instance
|
|
113
|
-
* @param
|
|
113
|
+
* @param id - ID (UUID) of the prompt to delete
|
|
114
114
|
* @param logger - Logger instance
|
|
115
115
|
* @returns True if deleted successfully, false if not found
|
|
116
116
|
*/
|
|
117
|
-
export declare function delete_prompt(db: SqlJsDatabase,
|
|
117
|
+
export declare function delete_prompt(db: SqlJsDatabase, id: string, logger: Logger): boolean;
|
|
118
118
|
//# sourceMappingURL=init_database.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init_database.d.ts","sourceRoot":"","sources":["../../../src/lib/database/init_database.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAkB,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAK9D,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYhE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBrD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQ/D;AAcD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAgFxB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,aAAa,GAAG,IAAI,CAatB;
|
|
1
|
+
{"version":3,"file":"init_database.d.ts","sourceRoot":"","sources":["../../../src/lib/database/init_database.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAkB,EAAE,QAAQ,IAAI,aAAa,EAAE,MAAM,QAAQ,CAAC;AAK9D,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYhE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAmBrD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAQ/D;AAcD;;;;;GAKG;AACH,wBAAsB,mBAAmB,CACvC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,aAAa,CAAC,CAgFxB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb,aAAa,GAAG,IAAI,CAatB;AAkJD;;;GAGG;AACH,wBAAgB,YAAY,IAAI,aAAa,GAAG,IAAI,CAEnD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAoClD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAyBnD;AAMD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,aAAa,EACjB,MAAM,EAAE,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,YAAY,GAAG,YAAY,CAAC,EAC9D,MAAM,EAAE,MAAM,GACb,YAAY,CAyEd;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,aAAa,EACjB,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,YAAY,GAAG,YAAY,CAAC,CAAC,EACxE,MAAM,EAAE,MAAM,GACb,YAAY,GAAG,IAAI,CAmHrB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,aAAa,EACjB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GACb,OAAO,CAgDT"}
|