TrailblazeElementComparator

class TrailblazeElementComparator(screenStateProvider: () -> ScreenState, llmModel: LLModel, llmClient: LLMClient, systemPromptToolTemplate: String = TemplatingUtil.getResourceAsText("trailblaze_locator_tool_system_prompt.md")!!, userPromptTemplate: String = TemplatingUtil.getResourceAsText("trailblaze_locator_user_prompt_template.md")!!) : ElementComparator

Service that identifies element locators and evaluates UI elements.

Constructors

Link copied to clipboard
constructor(screenStateProvider: () -> ScreenState, llmModel: LLModel, llmClient: LLMClient, systemPromptToolTemplate: String = TemplatingUtil.getResourceAsText("trailblaze_locator_tool_system_prompt.md")!!, userPromptTemplate: String = TemplatingUtil.getResourceAsText("trailblaze_locator_user_prompt_template.md")!!)

Functions

Link copied to clipboard
open override fun evaluateBoolean(statement: String): BooleanAssertionTrailblazeTool

Evaluates a statement about the UI and returns a boolean result with explanation.

Link copied to clipboard
open override fun evaluateString(query: String): StringEvaluationTrailblazeTool

Evaluates a prompt and returns a descriptive string response with explanation.

Link copied to clipboard
open override fun extractNumberFromString(input: String): Double?

Extracts a number from a string using regex, handling commas as thousands separators.

Link copied to clipboard
open override fun getElementValue(prompt: String): String?

Gets the value of an element based on a prompt description.