@glodon-aiot/apis
Version:
aiot apis
29 lines (28 loc) • 1.51 kB
TypeScript
import { AxiosInstance } from 'axios';
import { OCRMinioParams, OCRResult, IChatCompletion, DetectionParam, IDetectionResult, OCRPvcBatchParams, OCRBatchResult, IEmbedding, LayoutV1DetectionParam, LayoutV1IDetectionResult } from './model';
import { ApiErrorHandler, BaseApi } from '../base';
import { IBaseModel } from '../aecpilotui/model';
export declare class AIShopApi extends BaseApi {
constructor(axiosInstance?: AxiosInstance, errorHandler?: ApiErrorHandler);
ocr(serviceId: string, params: OCRMinioParams): Promise<{
box: [x: number, y: number][];
}[]>;
convertToBatchParams(params: OCRMinioParams): {
pages: {
image: string | undefined;
}[];
};
convertToMinioResult(batchResult: OCRBatchResult): {
box: [x: number, y: number][];
}[];
ocrMinio(serviceId: string, params: OCRMinioParams): Promise<OCRResult[]>;
ocrPvcBatch(serviceId: string, params: OCRPvcBatchParams): Promise<OCRBatchResult>;
getSleep(second: number): Promise<unknown>;
postChatCompletions(param: IChatCompletion): Promise<any>;
detection(serviceId: string, params: DetectionParam): Promise<IDetectionResult>;
detectionLayout(serviceId: string, params: DetectionParam | LayoutV1DetectionParam): Promise<IDetectionResult>;
convertLayoutToDetection(result: LayoutV1IDetectionResult): IDetectionResult;
getBaseModel(serviceId: string): Promise<IBaseModel>;
postEmbeddings(params: IEmbedding): Promise<any>;
}
export * from './model';