We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba12d57 commit 399eceaCopy full SHA for 399ecea
2 files changed
backend/infrastructure/database/user_queries_test.go
@@ -2,6 +2,7 @@ package database_test
2
3
import (
4
"context"
5
+ "fmt"
6
"testing"
7
"time"
8
@@ -279,9 +280,9 @@ func TestTotalEmbeddingDiaryCount(t *testing.T) {
279
280
// 同じdiaryIDで複数のembeddingを挿入
281
for i := 0; i < 3; i++ {
282
if _, err := db.ExecContext(ctx,
- `INSERT INTO diary_embeddings (id, diary_id, user_id, content, embedding, model_version, created_at, updated_at)
283
- VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`,
284
- uuid.New(), diaryID, userID, fmt.Sprintf("チャンク %d", i), "{0.1,0.2,0.3}", "v1", now, now,
+ `INSERT INTO diary_embeddings (id, diary_id, user_id, chunk_index, chunk_content, chunk_summary, embedding, model_version)
+ VALUES ($1, $2, $3, $4, $5, $6, array_fill(0.1, ARRAY[3072])::halfvec, $7)`,
285
+ uuid.New(), diaryID, userID, i, fmt.Sprintf("チャンク内容 %d", i), fmt.Sprintf("チャンク概要 %d", i), "v1",
286
); err != nil {
287
t.Fatalf("embeddingの挿入に失敗: %v", err)
288
}
frontend/src/routes/llm/+page.svelte
@@ -144,12 +144,7 @@
144
];
145
146
// RAGカード用データ
147
- $: ragCards: {
148
- title: string;
149
- value: number;
150
- subLabel?: string;
151
- color: string;
152
- }[] = [
+ $: ragCards = [
153
{
154
title: $_("llm.metrics.totalEmbeddings"),
155
value: metrics.summary.totalEmbeddingDiaries,
@@ -161,7 +156,12 @@
161
156
value: metrics.summary.pendingEmbeddings,
162
157
color: "text-pink-600 dark:text-pink-400",
163
158
},
164
- ];
159
+ ] as {
160
+ title: string;
+ value: number;
+ subLabel?: string;
+ color: string;
+ }[];
165
</script>
166
167
<Head title={$_("llm.title")} />
0 commit comments