mirror of
https://github.com/BookStackApp/BookStack.git
synced 2026-05-04 18:08:46 +03:00
26 lines
648 B
PHP
26 lines
648 B
PHP
<?php
|
|
|
|
namespace BookStack\Search\Queries\Services;
|
|
|
|
use BookStack\Entities\Models\Entity;
|
|
|
|
interface LlmQueryService
|
|
{
|
|
/**
|
|
* Generate embedding vectors from the given chunk of text.
|
|
* @return float[]
|
|
*/
|
|
public function generateEmbeddings(string $text): array;
|
|
|
|
public function queryToSearchTerms(string $text): array;
|
|
|
|
/**
|
|
* Query the LLM service using the given user input, and
|
|
* relevant entity content retrieved locally via a search.
|
|
* Returns the response output text from the LLM.
|
|
*
|
|
* @param Entity[] $context
|
|
*/
|
|
public function query(string $input, array $context): string;
|
|
}
|