pub struct QAEntry {
pub question: String,
pub answer: String,
pub context: String,
pub feedback_text: Option<String>,
pub feedback_score: Option<i32>,
pub used_graph_element_ids: Option<Value>,
}Expand description
A Q&A turn stored in the session cache.
Python parity: cognee/memory/entries.py:18-31. context defaults
to ""; the three optional feedback fields default to None.
Fields§
§question: StringThe user question.
answer: StringThe assistant answer.
context: StringOptional retrieval context. Defaults to "" (Python parity).
feedback_text: Option<String>Optional free-form feedback string.
feedback_score: Option<i32>Optional 1..=5 feedback score (validated downstream by
SessionManager::add_feedback).
used_graph_element_ids: Option<Value>Optional graph element ids consulted to produce the answer.
Wire shape mirrors Python’s dict — unconstrained serde_json::Value.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for QAEntry
impl<'de> Deserialize<'de> for QAEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for QAEntry
impl RefUnwindSafe for QAEntry
impl Send for QAEntry
impl Sync for QAEntry
impl Unpin for QAEntry
impl UnsafeUnpin for QAEntry
impl UnwindSafe for QAEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more