package com.qmth.boot.core.ai.config;

import com.qmth.boot.core.retrofit.interfaces.CustomizeRetrofitConfiguration;
import com.qmth.boot.core.retrofit.interfaces.SignatureProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.time.Duration;

public class OcrApiConfiguration implements CustomizeRetrofitConfiguration {

    private static final Logger log = LoggerFactory.getLogger(OcrApiConfiguration.class);

    private OcrProperties ocrProperties;

    public OcrApiConfiguration(OcrProperties ocrProperties) {
        this.ocrProperties = ocrProperties;
        log.info("OCR api configuration inited, server=" + ocrProperties.getServer());
    }

    public String getBaseUrl() {
        return ocrProperties.getServer();
    }

    public SignatureProvider getSignature() {
        return null;
    }

    @Override
    public Duration getReadTimeout() {
        return Duration.ofSeconds(60);
    }
}
