38 lines
922 B
C++
38 lines
922 B
C++
#pragma once
|
|
#include <string>
|
|
#include <vector>
|
|
#include <optional>
|
|
#include <unordered_map>
|
|
|
|
struct NamespaceRow { std::string id; std::string name; };
|
|
struct ThreadRow { std::string id; std::string namespace_id; std::string external_id; };
|
|
struct UserRow { std::string id; std::string external_id; };
|
|
|
|
struct ItemRow {
|
|
std::string id;
|
|
std::string namespace_id;
|
|
std::optional<std::string> thread_id;
|
|
std::optional<std::string> user_id;
|
|
std::optional<std::string> key;
|
|
std::string content_json;
|
|
std::optional<std::string> text;
|
|
std::vector<std::string> tags;
|
|
std::unordered_map<std::string, std::string> metadata;
|
|
int revision{1};
|
|
};
|
|
|
|
struct ChunkRow {
|
|
std::string id;
|
|
std::string item_id;
|
|
int ord{0};
|
|
std::string text;
|
|
};
|
|
|
|
struct EmbeddingRow {
|
|
std::string id;
|
|
std::string chunk_id;
|
|
std::string model;
|
|
int dim{0};
|
|
std::vector<float> vector;
|
|
};
|