seedframe 0.1.2

A clean, macro driven Rust library for building LLM apps
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Represents contents of a document for use in embedding,
/// and similarity search.
#[derive(Debug, Clone, Eq, PartialEq)]
pub struct Document {
    /// identifies a document in the store
    pub id: String,
    /// raw data of the document
    pub data: String,
}

impl Document {
    #[must_use]
    pub fn new(id: String, data: String) -> Self {
        Self { id, data }
    }
}