]> git.puffer.fish Git - matthieu/gru.git/commitdiff
Update inference.rs
authorMatthieu Pignolet <matthieu@matthieu-dev.xyz>
Wed, 6 Nov 2024 06:25:17 +0000 (10:25 +0400)
committerGitHub <noreply@github.com>
Wed, 6 Nov 2024 06:25:17 +0000 (10:25 +0400)
autofeur_db/src/inference.rs

index f8c1351eb5bb6fc4b4593411177ebad2b27a0d5d..87574af31bb24259bf28c4a201aa1b61814d2d56 100644 (file)
@@ -46,10 +46,12 @@ impl Save<'_> {
             let sub: String = characters.iter().join("");
             let inference = call_inference_service(&sub).await?;
 
-            if levenshtein(&inference, &completion) < 2 {
+            if levenshtein(&inference, &completion) < 5 {
                 found = Some(sub);
                 break;
             } else {
+                found = Some(sub);
+                break;
                 println!("did not match a={}, b={}", inference, completion)
             }
         }