]> BookStack Code Mirror - bookstack/blobdiff - app/Search/Vectors/Services/VectorQueryService.php
Vectors: Got basic LLM querying working using vector search context
[bookstack] / app / Search / Vectors / Services / VectorQueryService.php
index 2cc4ed0178f4e8590b0eeb7f219ebf05b3480a66..746f95f5b227d8d690feccf5433727df97052fca 100644 (file)
@@ -9,4 +9,13 @@ interface VectorQueryService
      * @return float[]
      */
     public function generateEmbeddings(string $text): array;
+
+    /**
+     * Query the LLM service using the given user input, and
+     * relevant context text retrieved locally via a vector search.
+     * Returns the response output text from the LLM.
+     *
+     * @param string[] $context
+     */
+    public function query(string $input, array $context): string;
 }