Skip to content

Commit 399ecea

Browse files
committed
fix PR
1 parent ba12d57 commit 399ecea

2 files changed

Lines changed: 11 additions & 10 deletions

File tree

backend/infrastructure/database/user_queries_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package database_test
22

33
import (
44
"context"
5+
"fmt"
56
"testing"
67
"time"
78

@@ -279,9 +280,9 @@ func TestTotalEmbeddingDiaryCount(t *testing.T) {
279280
// 同じdiaryIDで複数のembeddingを挿入
280281
for i := 0; i < 3; i++ {
281282
if _, err := db.ExecContext(ctx,
282-
`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,
283+
`INSERT INTO diary_embeddings (id, diary_id, user_id, chunk_index, chunk_content, chunk_summary, embedding, model_version)
284+
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",
285286
); err != nil {
286287
t.Fatalf("embeddingの挿入に失敗: %v", err)
287288
}

frontend/src/routes/llm/+page.svelte

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@
144144
];
145145
146146
// RAGカード用データ
147-
$: ragCards: {
148-
title: string;
149-
value: number;
150-
subLabel?: string;
151-
color: string;
152-
}[] = [
147+
$: ragCards = [
153148
{
154149
title: $_("llm.metrics.totalEmbeddings"),
155150
value: metrics.summary.totalEmbeddingDiaries,
@@ -161,7 +156,12 @@
161156
value: metrics.summary.pendingEmbeddings,
162157
color: "text-pink-600 dark:text-pink-400",
163158
},
164-
];
159+
] as {
160+
title: string;
161+
value: number;
162+
subLabel?: string;
163+
color: string;
164+
}[];
165165
</script>
166166

167167
<Head title={$_("llm.title")} />

0 commit comments

Comments
 (0)