1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-30 04:23:11 +03:00

Vectors: Got basic LLM querying working using vector search context

This commit is contained in:
Dan Brown
2025-03-24 19:51:48 +00:00
parent 8452099a5b
commit 0ffcb3d4aa
8 changed files with 114 additions and 2 deletions

View 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,
];
}