class RerankingPrompt implements Countable

Methods

__construct(array $documents, string $query, int|null $limit, RerankingProvider $provider, string $model, int $timeout = 30, array $providerOptions = [])

Create a new reranking prompt instance.

bool
contains(string $string)

Determine if the query contains the given string.

bool
documentsContain(string $string)

Determine if any of the documents contain the given string.

int
count()

Get the number of documents in the prompt.

Details

at line 19
__construct(array $documents, string $query, int|null $limit, RerankingProvider $provider, string $model, int $timeout = 30, array $providerOptions = [])

Create a new reranking prompt instance.

Parameters

array $documents
string $query
int|null $limit
RerankingProvider $provider
string $model
int $timeout
array $providerOptions

at line 33
bool contains(string $string)

Determine if the query contains the given string.

Parameters

string $string

Return Value

bool

at line 41
bool documentsContain(string $string)

Determine if any of the documents contain the given string.

Parameters

string $string

Return Value

bool

at line 49
int count()

Get the number of documents in the prompt.

Return Value

int