#include "error.h"
#include "result.h"

//
#include "_chatresult.h"

const char *chat_result_get_assistant_message(ChatResult *result) {
    if (result == nullptr) {
        return nullptr;
    }
    return result->assistantMessage_.c_str();
}

const char *chat_result_get_reasoning_message(ChatResult *result) {
    if (result == nullptr) {
        return nullptr;
    }
    return result->reasoningMessage_.c_str();
}

const char *chat_result_get_finish_reason_message(ChatResult *result) {
    if (result == nullptr) {
        return nullptr;
    }
    return result->finishReasonMessage_.c_str();
}

int chat_result_get_error_code(ChatResult *result) {
    if (result == nullptr) {
        return NLP_INPUT_INVALID;
    }
    return result->errorCode_;
}

const char *chat_result_get_error_message(ChatResult *result) {
    if (result == nullptr) {
        return nullptr;
    }
    return result->errorMessage_.c_str();
}

bool chat_result_get_is_end(ChatResult *result) {
    if (result == nullptr) {
        return true;
    }
    return result->isEnd_;
}