]> BookStack Code Mirror - bookstack/blobdiff - app/Search/Vectors/EntityVectorGenerator.php
Vectors: Got basic LLM querying working using vector search context
[bookstack] / app / Search / Vectors / EntityVectorGenerator.php
index 8a49187736b43d64fea1723ebc3f056f463ba067..9563694a321838539a0a9bf7c7daff5c97a172bc 100644 (file)
@@ -42,7 +42,7 @@ class EntityVectorGenerator
             $toInsert[] = [
                 'entity_id' => $entity->id,
                 'entity_type' => $entity->getMorphClass(),
-                'embedding' => DB::raw('STRING_TO_VECTOR("[' . implode(',', $embedding) . ']")'),
+                'embedding' => DB::raw('VEC_FROMTEXT("[' . implode(',', $embedding) . ']")'),
                 'text' => $text,
             ];
         }