From a21fd44f64bada6fec79df70c5e43f8cd89bb19d Mon Sep 17 00:00:00 2001 From: JMARyA Date: Thu, 2 Jan 2025 19:10:27 +0100 Subject: [PATCH] fix --- src/ai.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ai.rs b/src/ai.rs index 32069ae..816ca3a 100644 --- a/src/ai.rs +++ b/src/ai.rs @@ -29,8 +29,8 @@ pub struct DocEmbedding { } impl DocEmbedding { - pub async fn total_chunks(&self) -> i64 { - let res: (i64,) = sqlx::query_as( + pub async fn total_chunks(&self) -> i32 { + let res: (i32,) = sqlx::query_as( "SELECT MAX(chunk) FROM doc_embedding WHERE domain = $1 AND path = $2 AND ver = $3", ) .bind(&self.domain) @@ -48,12 +48,12 @@ impl DocEmbedding { pub struct SearchResult { pub domain: String, pub path: String, - pub total_chunks: i64, + pub total_chunks: i32, pub chunks: Vec, } impl SearchResult { - pub fn new(domain: String, path: String, total_chunks: i64) -> Self { + pub fn new(domain: String, path: String, total_chunks: i32) -> Self { Self { domain, path,