Version:
classimplements VisionFinderInterface

VercelAiSdkVisionFinder

Vision finder implementation powered by Vercel AI SDK.

The provider uses an LLM vision model to decide whether screen content matches
a natural language description and optionally returns one or more matching
regions.

typescript
class VercelAiSdkVisionFinder implements VisionFinderInterface

Methods

findMatch

findMatch(matchRequest: MatchRequest<{ by: { description: string }; id: string; type: "vision" }, PROVIDER_DATA_TYPE>): Promise<MatchResult<Region>>

Finds the single best region matching the given vision query.

Parameters

matchRequestMatchRequest<{ by: { description: string }; id: string; type: "vision" }, PROVIDER_DATA_TYPE>The match request containing the needle description
and haystack image.

Returns

Promise<MatchResult<Region>>

findMatches

findMatches(matchRequest: MatchRequest<{ by: { description: string }; id: string; type: "vision" }, PROVIDER_DATA_TYPE>): Promise<MatchResult<Region>[]>

Finds all regions matching the given vision query, up to the configured
maximum.

Parameters

matchRequestMatchRequest<{ by: { description: string }; id: string; type: "vision" }, PROVIDER_DATA_TYPE>The match request containing the needle description
and haystack image.

Returns

Promise<MatchResult<Region>[]>

Was this page helpful?