Companion
Properties
Link copied to clipboard
The prefix to add before relevant context.
Link copied to clipboard
Placeholder in prompt templates for insertion of relevant context.
Link copied to clipboard
Separator inserted between logical sections of a message (e.g. between the original system content and an appended retrieved-context section, or between multiple retrieved-context sections). Shared by all built-in PromptAugmenter implementations to keep the rendered layout consistent.
Functions
Link copied to clipboard
Returns a builder that lets you choose a default PromptAugmenter implementation.
Link copied to clipboard
fun formatContext(relevantContext: List<SearchResult<TextDocument>>, contextPrefix: String = DEFAULT_CONTEXT_PREFIX): String
Formats a list of search results into a numbered text block with the given prefix.
Link copied to clipboard
Formats the template by replacing placeholders with actual content.