mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-21 05:26:10 +03:00
22 lines
555 B
PHP
22 lines
555 B
PHP
<?php
|
|
|
|
namespace BookStack\Search\Vectors\Services;
|
|
|
|
interface VectorQueryService
|
|
{
|
|
/**
|
|
* Generate embedding vectors from the given chunk of text.
|
|
* @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;
|
|
}
|