package cn.com.poc.thirdparty.resource.demand.ai.aggregate.impl;

import cn.com.poc.thirdparty.resource.demand.ai.aggregate.MinerUOcrService;
import cn.com.poc.thirdparty.resource.demand.ai.entity.orc.minerU.MinerUOcrResult;
import cn.com.poc.thirdparty.resource.minerU.MinerUResponse;
import cn.com.poc.thirdparty.resource.minerU.api.MinerUAPI;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.io.File;

/**
 * @author alex.yao
 * @date 2025/7/28
 */
@Service
public class MinerUOcrServiceImpl implements MinerUOcrService {



    @Resource
    private MinerUAPI minerUAPI;

    @Override
    public MinerUOcrResult fileParse(File file){
        MinerUResponse minerUResponse = new MinerUResponse();
        minerUResponse.setFiles(file);
        return (MinerUOcrResult) minerUAPI.parsePDF(minerUResponse);
    }
}
