@lobehub/lobehub 2.1.23 → 2.1.25
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/.github/workflows/claude-auto-e2e-testing.yml +131 -0
- package/CHANGELOG.md +42 -0
- package/changelog/v2.json +14 -0
- package/docs/development/database-schema.dbml +43 -14
- package/package.json +1 -1
- package/packages/database/migrations/0078_added_id_nanoid_for_replacing_id.sql +7 -0
- package/packages/database/migrations/0079_update_id_nanoid_from_casted_id.sql +7 -0
- package/packages/database/migrations/0080_add_constraint_unique_not_null_to_id_nanoid.sql +27 -0
- package/packages/database/migrations/0081_switch_forgien_key_to_id_nanoid.sql +37 -0
- package/packages/database/migrations/0082_set_id_nanoid_as_primary.sql +20 -0
- package/packages/database/migrations/0083_remove_id_seq_identity_column.sql +7 -0
- package/packages/database/migrations/0084_rename_id_nanoid_to_id.sql +53 -0
- package/packages/database/migrations/0085_remove_id_unique_constraint.sql +7 -0
- package/packages/database/migrations/meta/0078_snapshot.json +11515 -0
- package/packages/database/migrations/meta/0079_snapshot.json +11515 -0
- package/packages/database/migrations/meta/0080_snapshot.json +11554 -0
- package/packages/database/migrations/meta/0081_snapshot.json +11554 -0
- package/packages/database/migrations/meta/0082_snapshot.json +11554 -0
- package/packages/database/migrations/meta/0083_snapshot.json +11435 -0
- package/packages/database/migrations/meta/0084_snapshot.json +11435 -0
- package/packages/database/migrations/meta/0085_snapshot.json +11396 -0
- package/packages/database/migrations/meta/_journal.json +56 -0
- package/packages/database/src/models/__tests__/apiKey.test.ts +18 -6
- package/packages/database/src/models/apiKey.ts +5 -5
- package/packages/database/src/schemas/apiKey.ts +6 -2
- package/packages/database/src/schemas/ragEvals.ts +27 -20
- package/packages/database/src/schemas/rbac.ts +15 -15
- package/packages/database/src/server/models/ragEval/dataset.ts +3 -3
- package/packages/database/src/server/models/ragEval/datasetRecord.ts +5 -5
- package/packages/database/src/server/models/ragEval/evaluation.ts +3 -3
- package/packages/database/src/server/models/ragEval/evaluationRecord.ts +6 -6
- package/packages/memory-user-memory/src/prompts/layers/activity.ts +19 -18
- package/packages/memory-user-memory/src/prompts/layers/context.ts +39 -38
- package/packages/memory-user-memory/src/prompts/layers/experience.ts +40 -39
- package/packages/memory-user-memory/src/prompts/layers/identity.ts +55 -48
- package/packages/memory-user-memory/src/prompts/layers/preference.ts +42 -41
- package/packages/types/src/apiKey.ts +1 -1
- package/packages/types/src/eval/dataset.ts +2 -2
- package/packages/types/src/eval/evaluation.ts +3 -3
- package/src/app/[variants]/(main)/settings/apikey/features/ApiKey.tsx +2 -2
- package/src/server/routers/async/ragEval.ts +1 -1
- package/src/server/routers/lambda/apiKey.ts +3 -3
- package/src/server/routers/lambda/ragEval.ts +10 -10
- package/src/server/routers/tools/_helpers/scheduleToolCallReport.test.ts +589 -0
- package/src/services/ragEval.ts +10 -10
- package/src/store/chat/slices/aiChat/actions/StreamingHandler.ts +6 -5
- package/src/store/chat/slices/aiChat/actions/__tests__/StreamingHandler.test.ts +302 -0
- package/src/store/chat/slices/aiChat/actions/__tests__/streamingExecutor.test.ts +168 -0
- package/src/store/chat/slices/aiChat/actions/streamingExecutor.ts +11 -2
- package/src/store/chat/slices/aiChat/actions/types/streaming.ts +12 -8
- package/src/store/chat/slices/message/actions/optimisticUpdate.ts +1 -1
- package/src/store/library/slices/ragEval/actions/dataset.ts +3 -3
- package/src/store/library/slices/ragEval/actions/evaluation.ts +3 -3
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
export const preferencePrompt = [
|
|
2
2
|
'You are a focused memory extraction assistant specialized in the **preference**',
|
|
3
3
|
'layer. When extracting, ensure all the content is using {{ language }}.',
|
|
4
|
-
'',
|
|
4
|
+
'\n',
|
|
5
5
|
'\\<user_context>',
|
|
6
6
|
'Current user: {{ username }}',
|
|
7
7
|
'Session date: {{ sessionDate }}',
|
|
8
8
|
'Available memory categories: {{ availableCategories }}',
|
|
9
9
|
'Target layer: preference',
|
|
10
10
|
'\\</user_context>',
|
|
11
|
-
'',
|
|
11
|
+
'\n',
|
|
12
12
|
'## Retrieved Memory (Top {{ topK }})',
|
|
13
|
-
'',
|
|
13
|
+
'\n',
|
|
14
14
|
'Use the list below to de-duplicate and decide whether you need to extract',
|
|
15
15
|
'anything. Do not copy these verbatim; use them for comparison.',
|
|
16
|
-
'',
|
|
16
|
+
'\n',
|
|
17
17
|
'{{ retrievedContext }}',
|
|
18
|
-
'',
|
|
18
|
+
'\n',
|
|
19
19
|
'## Your Task',
|
|
20
|
-
'',
|
|
20
|
+
'\n',
|
|
21
21
|
'Extract **ALL** preference layer information from the conversation. Capture user',
|
|
22
22
|
'choices, directives, likes, dislikes, and behavioral guidance for the assistant.',
|
|
23
|
-
'',
|
|
23
|
+
'\n',
|
|
24
24
|
'**CRITICAL**: Return an **array** of memory items. One conversation can include',
|
|
25
25
|
'more than one preference memory. Extract each as a separate item.',
|
|
26
|
-
'',
|
|
26
|
+
'\n',
|
|
27
27
|
'Before extracting, review the retrieved similar memories first (top {{ topK }}',
|
|
28
28
|
'items shown below). Extract items that are NEW or MATERIALLY UPDATED compared to',
|
|
29
29
|
'retrieved entries. Avoid duplicates or near-duplicates. Prefer manual merging',
|
|
30
30
|
'over duplication: if content is already covered with no meaningful new detail,',
|
|
31
31
|
'do not extract it again.',
|
|
32
|
-
'',
|
|
32
|
+
'\n',
|
|
33
33
|
'## Name Handling and Neutrality',
|
|
34
|
-
'',
|
|
34
|
+
'\n',
|
|
35
35
|
'- Always refer to the user with the exact placeholder token "User". Do not',
|
|
36
36
|
" infer, invent, or translate the user's real name.",
|
|
37
37
|
'- Do not assign gendered terms or honorifics (e.g., "先生 / 女士",',
|
|
38
38
|
' "Mr./Ms."). Keep all references neutral during extraction.',
|
|
39
|
-
'',
|
|
39
|
+
'\n',
|
|
40
40
|
'## Preference vs. Requirement',
|
|
41
|
-
'',
|
|
41
|
+
'\n',
|
|
42
42
|
'- Extract durable, reusable user preferences that guide future assistant',
|
|
43
43
|
' behavior.',
|
|
44
44
|
'- Do NOT extract one-off task requirements, step-by-step implementation plans,',
|
|
@@ -46,46 +46,47 @@ export const preferencePrompt = [
|
|
|
46
46
|
'- Do NOT infer a language preference from the conversation language alone.',
|
|
47
47
|
' Extract language preferences when the user explicitly states a persistent',
|
|
48
48
|
' request (e.g., "Always reply in Chinese").',
|
|
49
|
-
'',
|
|
49
|
+
'\n',
|
|
50
50
|
'## Output Format',
|
|
51
|
-
'',
|
|
51
|
+
'\n',
|
|
52
52
|
'Return structured JSON data according to the provided schema. The output must',
|
|
53
53
|
'pass validation against a strict schema including:',
|
|
54
|
-
'',
|
|
54
|
+
'\n',
|
|
55
55
|
'- Basic fields: title, summary, details, memoryLayer, memoryType,',
|
|
56
56
|
' memoryCategory',
|
|
57
57
|
'- Preference-specific fields in withPreference: extractedLabels,',
|
|
58
58
|
' extractedScopes (array of strings), originContext (trigger, scenario, actor,',
|
|
59
59
|
' applicableWhen, notApplicableWhen), appContext (app, surface, feature,',
|
|
60
60
|
' route), conclusionDirectives, type, suggestions, scorePriority',
|
|
61
|
-
'',
|
|
61
|
+
'\n',
|
|
62
62
|
'`extractedScopes` is a simple string array describing the preference scope.',
|
|
63
|
-
'',
|
|
63
|
+
'\n',
|
|
64
64
|
'## Memory Formatting Guidelines',
|
|
65
|
-
'',
|
|
65
|
+
'\n',
|
|
66
66
|
'> CRITICAL REQUIREMENT: ALL MEMORY ITEMS MUST BE SELF-CONTAINED',
|
|
67
|
-
'',
|
|
67
|
+
'- Do not append date or time information to the `title`; keep timing in temporal fields or narrative instead.',
|
|
68
|
+
'\n',
|
|
68
69
|
'Every memory item you create must be standalone and understandable without',
|
|
69
70
|
'extra context:',
|
|
70
|
-
'',
|
|
71
|
+
'\n',
|
|
71
72
|
'✓ **Required Elements:**',
|
|
72
|
-
'',
|
|
73
|
+
'\n',
|
|
73
74
|
'- Use full names and specific subjects—NEVER use pronouns',
|
|
74
75
|
' (he/she/they/it/this/that)',
|
|
75
76
|
'- Include specific names, places, dates, and complete context',
|
|
76
77
|
'- Preserve the original language from user input—do not translate',
|
|
77
78
|
'- Capture relevant details, emotions, and outcomes',
|
|
78
79
|
'- Ensure each item is comprehensible independently',
|
|
79
|
-
'',
|
|
80
|
+
'\n',
|
|
80
81
|
'✓ **Good Examples:**',
|
|
81
|
-
'',
|
|
82
|
+
'\n',
|
|
82
83
|
'- "When providing technical answers, {{ username }} prefers concise bullet',
|
|
83
84
|
' points and TypeScript code examples; avoid lengthy prose."',
|
|
84
85
|
'- "For daily planning, {{ username }} wants reminders at 08:00 local time and a',
|
|
85
86
|
' single summary message at 21:00 describing completed tasks."',
|
|
86
|
-
'',
|
|
87
|
+
'\n',
|
|
87
88
|
'✗ **Bad Examples:**',
|
|
88
|
-
'',
|
|
89
|
+
'\n',
|
|
89
90
|
'- "She went to a support group" → Missing: who, when, what happened, emotional',
|
|
90
91
|
' outcome',
|
|
91
92
|
'- "They felt happy" → Missing: who, context, cause of emotion',
|
|
@@ -93,9 +94,9 @@ export const preferencePrompt = [
|
|
|
93
94
|
' gained',
|
|
94
95
|
'- "This made them realize something important" → Vague pronouns and undefined',
|
|
95
96
|
' referents',
|
|
96
|
-
'',
|
|
97
|
+
'\n',
|
|
97
98
|
'## Layer-Specific Extraction Guidance',
|
|
98
|
-
'',
|
|
99
|
+
'\n',
|
|
99
100
|
'Capture actionable rules that guide assistant behavior and decision-making.',
|
|
100
101
|
'Define `extractedScopes` to clarify applicability (time ranges, contexts,',
|
|
101
102
|
'channels). Use `originContext` and `appContext` to describe when and where the',
|
|
@@ -103,28 +104,28 @@ export const preferencePrompt = [
|
|
|
103
104
|
"from the user's perspective. Use `scorePriority` to mark preferences that should",
|
|
104
105
|
'override conflicting defaults. Provide `suggestions` for helpful follow-up',
|
|
105
106
|
'actions. Avoid implementation details; focus on what the assistant should do.',
|
|
106
|
-
'',
|
|
107
|
+
'\n',
|
|
107
108
|
'Examples of preference information:',
|
|
108
|
-
'',
|
|
109
|
+
'\n',
|
|
109
110
|
'- "{{ username }} prefers concise, bullet-point responses over long paragraphs',
|
|
110
111
|
' when asking technical questions"',
|
|
111
112
|
'- "{{ username }} likes to receive code examples in TypeScript rather than',
|
|
112
113
|
' JavaScript"',
|
|
113
114
|
'- "{{ username }} prefers morning workouts at 06:00 and dislikes exercising in',
|
|
114
115
|
' the evening"',
|
|
115
|
-
'',
|
|
116
|
+
'\n',
|
|
116
117
|
'Not preferences (do not extract):',
|
|
117
|
-
'',
|
|
118
|
+
'\n',
|
|
118
119
|
'- One-off task instructions (e.g., "帮我把这段话翻译成英文")',
|
|
119
120
|
'- Implementation details or step-by-step plans (e.g.,',
|
|
120
121
|
' "先抓取 API,然后解析 JSON…")',
|
|
121
122
|
'- Language used in the conversation unless explicitly stated as a persistent',
|
|
122
123
|
' preference',
|
|
123
|
-
'',
|
|
124
|
+
'\n',
|
|
124
125
|
'## Memory Type Classifications',
|
|
125
|
-
'',
|
|
126
|
+
'\n',
|
|
126
127
|
'Choose the appropriate memoryType:',
|
|
127
|
-
'',
|
|
128
|
+
'\n',
|
|
128
129
|
'- **activity**: Detailed conversations, interactions, and events with full',
|
|
129
130
|
' contextual narrative',
|
|
130
131
|
'- **event**: Specific time-bound occurrences (dates, milestones, appointments,',
|
|
@@ -138,27 +139,27 @@ export const preferencePrompt = [
|
|
|
138
139
|
'- **topic**: Subject matter, domains of interest, and knowledge areas',
|
|
139
140
|
'- **technology**: Tools, platforms, software, and technical systems',
|
|
140
141
|
'- **other**: Miscellaneous information not fitting other categories',
|
|
141
|
-
'',
|
|
142
|
+
'\n',
|
|
142
143
|
'## Security Considerations',
|
|
143
|
-
'',
|
|
144
|
+
'\n',
|
|
144
145
|
'**NEVER extract or store sensitive information:**',
|
|
145
|
-
'',
|
|
146
|
+
'\n',
|
|
146
147
|
'- Passwords, PINs, or authentication credentials',
|
|
147
148
|
'- API keys, tokens, or secret keys',
|
|
148
149
|
'- Financial data (credit cards, bank accounts, SSN)',
|
|
149
150
|
'- Medical records or protected health information',
|
|
150
151
|
'- Private encryption keys or certificates',
|
|
151
|
-
'',
|
|
152
|
+
'\n',
|
|
152
153
|
'---',
|
|
153
|
-
'',
|
|
154
|
+
'\n',
|
|
154
155
|
'## Final Instructions',
|
|
155
|
-
'',
|
|
156
|
+
'\n',
|
|
156
157
|
'1. Analyze the conversation for preference layer information',
|
|
157
158
|
'2. Extract each distinct preference memory as a separate item',
|
|
158
159
|
'3. Ensure all memories are self-contained (no pronouns, complete context)',
|
|
159
160
|
'4. Return a JSON array conforming to the schema above',
|
|
160
161
|
'5. Return `[]` if you find no preference memories',
|
|
161
162
|
'6. No matter what the language of the retrieved language is, always use {{ language }} for output',
|
|
162
|
-
'',
|
|
163
|
+
'\n',
|
|
163
164
|
'Respond with valid JSON without commentary.',
|
|
164
165
|
].join('\n');
|
|
@@ -7,7 +7,7 @@ export interface EvalDatasetRecordRefFile {
|
|
|
7
7
|
}
|
|
8
8
|
export interface EvalDatasetRecord {
|
|
9
9
|
createdAt: Date;
|
|
10
|
-
id:
|
|
10
|
+
id: string;
|
|
11
11
|
ideal?: string | null;
|
|
12
12
|
|
|
13
13
|
metadata: any;
|
|
@@ -33,7 +33,7 @@ export type InsertEvalDatasetRecord = z.infer<typeof insertEvalDatasetRecordSche
|
|
|
33
33
|
export interface RAGEvalDataSetItem {
|
|
34
34
|
createdAt: Date;
|
|
35
35
|
description?: string | null;
|
|
36
|
-
id:
|
|
36
|
+
id: string;
|
|
37
37
|
name: string;
|
|
38
38
|
updatedAt: Date;
|
|
39
39
|
}
|
|
@@ -29,11 +29,11 @@ export type InsertEvaluationRecord = z.infer<typeof insertEvaluationSchema>;
|
|
|
29
29
|
export interface RAGEvalEvaluationItem {
|
|
30
30
|
createdAt: Date;
|
|
31
31
|
dataset: {
|
|
32
|
-
id:
|
|
32
|
+
id: string;
|
|
33
33
|
name: string;
|
|
34
34
|
};
|
|
35
35
|
evalRecordsUrl?: string;
|
|
36
|
-
id:
|
|
36
|
+
id: string;
|
|
37
37
|
name: string;
|
|
38
38
|
recordsStats: {
|
|
39
39
|
success: number;
|
|
@@ -44,7 +44,7 @@ export interface RAGEvalEvaluationItem {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
export const insertEvalEvaluationSchema = z.object({
|
|
47
|
-
datasetId: z.
|
|
47
|
+
datasetId: z.string(),
|
|
48
48
|
description: z.string().optional(),
|
|
49
49
|
knowledgeBaseId: z.string(),
|
|
50
50
|
name: z.string(),
|
|
@@ -50,7 +50,7 @@ const ApiKey: FC = () => {
|
|
|
50
50
|
});
|
|
51
51
|
|
|
52
52
|
const updateMutation = useMutation({
|
|
53
|
-
mutationFn: ({ id, params }: { id:
|
|
53
|
+
mutationFn: ({ id, params }: { id: string; params: UpdateApiKeyParams }) =>
|
|
54
54
|
lambdaClient.apiKey.updateApiKey.mutate({ id, value: params }),
|
|
55
55
|
onSuccess: () => {
|
|
56
56
|
actionRef.current?.reload();
|
|
@@ -58,7 +58,7 @@ const ApiKey: FC = () => {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
const deleteMutation = useMutation({
|
|
61
|
-
mutationFn: (id:
|
|
61
|
+
mutationFn: (id: string) => lambdaClient.apiKey.deleteApiKey.mutate({ id }),
|
|
62
62
|
onSuccess: () => {
|
|
63
63
|
actionRef.current?.reload();
|
|
64
64
|
},
|
|
@@ -35,7 +35,7 @@ export const apiKeyRouter = router({
|
|
|
35
35
|
}),
|
|
36
36
|
|
|
37
37
|
deleteApiKey: apiKeyProcedure
|
|
38
|
-
.input(z.object({ id: z.
|
|
38
|
+
.input(z.object({ id: z.string() }))
|
|
39
39
|
.mutation(async ({ input, ctx }) => {
|
|
40
40
|
return ctx.apiKeyModel.delete(input.id);
|
|
41
41
|
}),
|
|
@@ -47,7 +47,7 @@ export const apiKeyRouter = router({
|
|
|
47
47
|
}),
|
|
48
48
|
|
|
49
49
|
getApiKeyById: apiKeyProcedure
|
|
50
|
-
.input(z.object({ id: z.
|
|
50
|
+
.input(z.object({ id: z.string() }))
|
|
51
51
|
.query(async ({ input, ctx }) => {
|
|
52
52
|
return ctx.apiKeyModel.findById(input.id);
|
|
53
53
|
}),
|
|
@@ -59,7 +59,7 @@ export const apiKeyRouter = router({
|
|
|
59
59
|
updateApiKey: apiKeyProcedure
|
|
60
60
|
.input(
|
|
61
61
|
z.object({
|
|
62
|
-
id: z.
|
|
62
|
+
id: z.string(),
|
|
63
63
|
value: z.object({
|
|
64
64
|
description: z.string().optional(),
|
|
65
65
|
enabled: z.boolean().optional(),
|
|
@@ -72,7 +72,7 @@ export const ragEvalRouter = router({
|
|
|
72
72
|
}),
|
|
73
73
|
|
|
74
74
|
removeDataset: ragEvalProcedure
|
|
75
|
-
.input(z.object({ id: z.
|
|
75
|
+
.input(z.object({ id: z.string() }))
|
|
76
76
|
.mutation(async ({ input, ctx }) => {
|
|
77
77
|
return ctx.datasetModel.delete(input.id);
|
|
78
78
|
}),
|
|
@@ -80,7 +80,7 @@ export const ragEvalRouter = router({
|
|
|
80
80
|
updateDataset: ragEvalProcedure
|
|
81
81
|
.input(
|
|
82
82
|
z.object({
|
|
83
|
-
id: z.
|
|
83
|
+
id: z.string(),
|
|
84
84
|
value: insertEvalDatasetsSchema.partial(),
|
|
85
85
|
}),
|
|
86
86
|
)
|
|
@@ -92,7 +92,7 @@ export const ragEvalRouter = router({
|
|
|
92
92
|
createDatasetRecords: ragEvalProcedure
|
|
93
93
|
.input(
|
|
94
94
|
z.object({
|
|
95
|
-
datasetId: z.
|
|
95
|
+
datasetId: z.string(),
|
|
96
96
|
question: z.string(),
|
|
97
97
|
ideal: z.string().optional(),
|
|
98
98
|
referenceFiles: z.array(z.string()).optional(),
|
|
@@ -105,13 +105,13 @@ export const ragEvalRouter = router({
|
|
|
105
105
|
}),
|
|
106
106
|
|
|
107
107
|
getDatasetRecords: ragEvalProcedure
|
|
108
|
-
.input(z.object({ datasetId: z.
|
|
108
|
+
.input(z.object({ datasetId: z.string() }))
|
|
109
109
|
.query(async ({ ctx, input }): Promise<EvalDatasetRecord[]> => {
|
|
110
110
|
return ctx.datasetRecordModel.query(input.datasetId);
|
|
111
111
|
}),
|
|
112
112
|
|
|
113
113
|
removeDatasetRecords: ragEvalProcedure
|
|
114
|
-
.input(z.object({ id: z.
|
|
114
|
+
.input(z.object({ id: z.string() }))
|
|
115
115
|
.mutation(async ({ input, ctx }) => {
|
|
116
116
|
return ctx.datasetRecordModel.delete(input.id);
|
|
117
117
|
}),
|
|
@@ -119,7 +119,7 @@ export const ragEvalRouter = router({
|
|
|
119
119
|
updateDatasetRecords: ragEvalProcedure
|
|
120
120
|
.input(
|
|
121
121
|
z.object({
|
|
122
|
-
id: z.
|
|
122
|
+
id: z.string(),
|
|
123
123
|
value: z
|
|
124
124
|
.object({
|
|
125
125
|
question: z.string(),
|
|
@@ -137,7 +137,7 @@ export const ragEvalRouter = router({
|
|
|
137
137
|
importDatasetRecords: ragEvalProcedure
|
|
138
138
|
.input(
|
|
139
139
|
z.object({
|
|
140
|
-
datasetId: z.
|
|
140
|
+
datasetId: z.string(),
|
|
141
141
|
pathname: z.string(),
|
|
142
142
|
}),
|
|
143
143
|
)
|
|
@@ -173,7 +173,7 @@ export const ragEvalRouter = router({
|
|
|
173
173
|
|
|
174
174
|
// Evaluation operations
|
|
175
175
|
startEvaluationTask: ragEvalProcedure
|
|
176
|
-
.input(z.object({ id: z.
|
|
176
|
+
.input(z.object({ id: z.string() }))
|
|
177
177
|
.mutation(async ({ input, ctx }) => {
|
|
178
178
|
// Start evaluation task
|
|
179
179
|
const evaluation = await ctx.evaluationModel.findById(input.id);
|
|
@@ -238,7 +238,7 @@ export const ragEvalRouter = router({
|
|
|
238
238
|
}),
|
|
239
239
|
|
|
240
240
|
checkEvaluationStatus: ragEvalProcedure
|
|
241
|
-
.input(z.object({ id: z.
|
|
241
|
+
.input(z.object({ id: z.string() }))
|
|
242
242
|
.query(async ({ input, ctx }) => {
|
|
243
243
|
const evaluation = await ctx.evaluationModel.findById(input.id);
|
|
244
244
|
|
|
@@ -288,7 +288,7 @@ export const ragEvalRouter = router({
|
|
|
288
288
|
}),
|
|
289
289
|
|
|
290
290
|
removeEvaluation: ragEvalProcedure
|
|
291
|
-
.input(z.object({ id: z.
|
|
291
|
+
.input(z.object({ id: z.string() }))
|
|
292
292
|
.mutation(async ({ input, ctx }) => {
|
|
293
293
|
return ctx.evaluationModel.delete(input.id);
|
|
294
294
|
}),
|