AI Search
Provides AI semantic search capabilities, including text search and image-based search.
This feature is not yet released: This feature requires Eagle 4.0 build18+ and the future "AI Search" plugin to be installed. Please follow the Eagle website for release updates.
Introduction to AI Search Plugin
"AI Search" is a plugin that provides AI semantic search capabilities, supporting text-based semantic search and image-based similarity search. By integrating this plugin, developers can easily implement powerful AI search functionality in their own plugins.
Key Features
Text Semantic Search - Search for related images using natural language descriptions
Image-based Search - Find similar images using an image
Item ID Search - Find similar images based on existing items
How to Use AI Search
Use eagle.extraModule.aiSearch to access the AI Search plugin functionality.
Status Queries
Before calling search methods, it's recommended to check the service status:
eagle.onPluginCreate(async (plugin) => {
const aiSearch = eagle.extraModule.aiSearch;
// Check if the plugin is installed
const isInstalled = await aiSearch.isInstalled();
console.log('Installed:', isInstalled);
// Check if the service is ready
const isReady = await aiSearch.isReady();
console.log('Service Ready:', isReady);
// Check if the service is starting
const isStarting = await aiSearch.isStarting();
console.log('Starting:', isStarting);
// Check if data is syncing
const isSyncing = await aiSearch.isSyncing();
console.log('Syncing:', isSyncing);
});Service Control
Search Methods
searchByText(query, options) - Text Semantic Search
Search for related images using natural language descriptions.
querystring - Search keywords or descriptionoptionsObject (optional) - Search optionslimitnumber - Result count limit, default 20
Returns
Promise<Object>- Search resultsresultsArray - Array of search resultsitemItem - Complete Item objectscorenumber - Similarity score
searchByBase64(base64, options) - Base64 Image Search
Search for similar images using a Base64 encoded image.
base64string - Base64 encoded image stringoptionsObject (optional) - Search optionslimitnumber - Result count limit, default 20
Returns
Promise<Object>- Search results
searchByItemId(itemId, options) - Search by Existing Item
Search for similar images using an existing Eagle item ID.
itemIdstring - Eagle item IDoptionsObject (optional) - Search optionslimitnumber - Result count limit, default 20
Returns
Promise<Object>- Search results
Complete Example
Building a Similar Image Search Feature
API Reference
Status Query Methods
isInstalled()
Promise<boolean>
Check if AI Search plugin is installed
isReady()
Promise<boolean>
Check if service is ready
isStarting()
Promise<boolean>
Check if service is starting
isSyncing()
Promise<boolean>
Check if data is syncing
Service Control Methods
open()
Promise<void>
Open AI Search plugin
checkServiceHealth()
Promise<boolean>
Check service health status
getSyncStatus()
Promise<Object>
Get detailed sync status
Search Methods
searchByText(query, options?)
Promise<Object>
Text semantic search
searchByBase64(base64, options?)
Promise<Object>
Base64 image search
searchByItemId(itemId, options?)
Promise<Object>
Search similar images by item ID
Search Result Format
Last updated