Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
识别元素为文字。
elements
getElements
getLassoElements
uuid
static recognizeElements(elements: Object[] | null | undefined, size: { width: number; height: number }): Promise<APIResponse<string>>;
Object[] | null | undefined
size
{ width: number; height: number }
APIResponse<string>
import { PluginCommAPI } from 'sn-plugin-lib'; export async function exampleRecognizeElements(elements, size) { const res = await PluginCommAPI.recognizeElements(elements, size); if (!res.success) { throw new Error(res.error?.message ?? 'recognizeElements 调用失败'); } return res.result; }