@@ -17,6 +17,7 @@ pub struct StoreRequest {
1717 pub initial_confidence : Option < f64 > ,
1818 pub observed_at : Option < String > ,
1919 pub source : Option < String > ,
20+ pub branch : Option < String > ,
2021}
2122fn default_memory_type ( ) -> String {
2223 "semantic" . to_string ( )
@@ -25,6 +26,7 @@ fn default_memory_type() -> String {
2526#[ derive( Deserialize ) ]
2627pub struct BatchStoreRequest {
2728 pub memories : Vec < StoreRequest > ,
29+ pub branch : Option < String > ,
2830}
2931
3032#[ derive( Deserialize ) ]
@@ -34,6 +36,7 @@ pub struct RetrieveRequest {
3436 pub top_k : i64 ,
3537 pub session_id : Option < String > ,
3638 pub session_scope : Option < String > ,
39+ pub branch : Option < String > ,
3740 /// Explain level: false/"none" = off, true/"basic" = basic, "verbose" = per-candidate scores, "analyze" = full
3841 #[ serde( default , deserialize_with = "deserialize_explain" ) ]
3942 pub explain : String ,
@@ -79,6 +82,7 @@ pub struct SearchRequest {
7982 pub top_k : i64 ,
8083 pub session_id : Option < String > ,
8184 pub session_scope : Option < String > ,
85+ pub branch : Option < String > ,
8286 #[ serde( default , deserialize_with = "deserialize_explain" ) ]
8387 pub explain : String ,
8488}
@@ -122,6 +126,7 @@ fn deserialize_explain<'de, D: serde::Deserializer<'de>>(d: D) -> Result<String,
122126pub struct CorrectRequest {
123127 pub new_content : String ,
124128 pub reason : Option < String > ,
129+ pub branch : Option < String > ,
125130}
126131
127132#[ derive( Deserialize ) ]
@@ -131,6 +136,7 @@ pub struct CorrectByQueryRequest {
131136 pub session_id : Option < String > ,
132137 pub session_scope : Option < String > ,
133138 pub reason : Option < String > ,
139+ pub branch : Option < String > ,
134140}
135141
136142impl CorrectByQueryRequest {
@@ -156,6 +162,7 @@ pub struct PurgeRequest {
156162 pub session_id : Option < String > ,
157163 pub memory_types : Option < Vec < String > > ,
158164 pub reason : Option < String > ,
165+ pub branch : Option < String > ,
159166}
160167
161168pub enum PurgeSelector {
0 commit comments