/*
 * Copyright 2024 KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

#ifndef IMAGEEMBEDDINGSESSION_H
#define IMAGEEMBEDDINGSESSION_H

#include <string>

#include "embedding.h"
#include "embeddingcommon.h"
#include "imageembeddingprocessorproxy.h"

class _ImageEmbeddingSession {
public:
    int connect();
    int init();

    EmbeddingResult* embeddingText(const std::string& text);

    EmbeddingResult* embeddingImage(const std::string& file_path);

    EmbeddingResult* embeddingBase64Image(const std::string& file_data);

    void embeddingTextAsync(const std::string& text,
                            ImageEmbeddingResultCallback callback,
                            void* callback_user_data);

    void embeddingImageAsync(const std::string& file_path,
                             ImageEmbeddingResultCallback callback,
                             void* callback_user_data);

    void embeddingBase64ImageAsync(const std::string& file_data,
                                   ImageEmbeddingResultCallback callback,
                                   void* callback_user_data);
    std::string getModelInfo();

private:
    ImageEmbeddingProcessorProxy image_embedding_processor_proxy_;
};

#endif
