/*
 * 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/>.
 */

#include "textembeddingsession.h"

int _TextEmbeddingSession::connect() {
    // 先init 与runtime 的连接
    return text_embedding_processor_proxy_.connect();
}
int _TextEmbeddingSession::init() {
    // 在初始化engine
    return text_embedding_processor_proxy_.initEngine();
}

EmbeddingResult* _TextEmbeddingSession::embeddingText(const std::string& text) {
    return text_embedding_processor_proxy_.embeddingText(text);
}

void _TextEmbeddingSession::embeddingTextAsync(
    const std::string& text, TextEmbeddingResultCallback callback,
    void* callback_user_data) {
    text_embedding_processor_proxy_.embeddingTextAsync(text, callback,
                                                       callback_user_data);
}

std::string _TextEmbeddingSession::getModelInfo() {
    return text_embedding_processor_proxy_.getModelInfo();
}