QueryExtractor

fun interface QueryExtractor(source)

Extracts a search query string from a Prompt to be used for memory retrieval.

Implementations define how the search query is derived from the prompt messages. For example, the default LastUserMessageQueryExtractor uses the content of the last user message.

See also

Inheritors

Functions

Link copied to clipboard
abstract fun extract(prompt: Prompt): String?

Extracts a search query string from the given prompt.