#ifndef SLOTS_NORMALIZATION_H
#define SLOTS_NORMALIZATION_H

#pragma once

#include <jsoncpp/json/json.h>

#include <iostream>
#include <random>

#include "Database.h"
using namespace VectorDB;

class SlotsNormalization {
public:
    // 里面调用了 connect
    SlotsNormalization();
    ~SlotsNormalization();

    bool HasCollection();

    bool CheckStatus(std::string &&prefix, const Status &status);

    // 根据向量查询
    Json::Value Search(const std::vector<float> &queryVector, const std::string &queryText, const std::string &slotName,
                       const std::string &intentName);

private:
    std::shared_ptr<VectorDB::Database> client;
    std::string collectionName = "SLOTS";
    int dimension = 768;
    int filterNumber = 1;
    float similarityThreshold = 0.7f;
    std::vector<std::vector<float>> insert_vectors;
    std::vector<nlohmann::json> insert_jsons;
};

#endif  // SLOTS_NORMALIZATION_H