1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +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

@@ -0,0 +1,29 @@
@extends('layouts.simple')
@section('body')
<div class="container mt-xl" id="search-system">
<form action="{{ url('/search/query') }}" method="get">
<input name="query" type="text">
<button class="button">Query</button>
</form>
@if($results)
<h2>Results</h2>
<h3>LLM Output</h3>
<p>{{ $results['llm_result'] }}</p>
<h3>Entity Matches</h3>
@foreach($results['entity_matches'] as $match)
<div>
<div><strong>{{ $match['entity_type'] }}:{{ $match['entity_id'] }}; Distance: {{ $match['distance'] }}</strong></div>
<details>
<summary>match text</summary>
<div>{{ $match['text'] }}</div>
</details>
</div>
@endforeach
@endif
</div>
@stop