Skip to main content

ebbmem_client_generated/models/
recall_request_model.rs

1/*
2 * Ebb Memory Engine API
3 *
4 * Production cognitive memory engine and multi-transport gateway for autonomous AI agents. Features continuous mass-dilated logarithmic decay, Hebbian co-activation networks, off-heap mmap storage, and unified enterprise security.  Canonical public HTTP contract for Ebb client SDKs. Generated from the hosted FastAPI application. Excludes internal and admin routes (`/api/v1/admin/_**`, `/metrics`, `/mcp`). Protected operations require `Authorization: Bearer <token>` (security scheme `HTTPBearer`). The same routes accept an optional `X-API-Key` header and `X-Ebb-Namespace` to select a namespace. Error responses use the `ErrorResponse` envelope (`code`, `message`, `details`) plus FastAPI's `HTTPValidationError` for 422.  SDK subset of the Ebb HTTP contract. Includes Memory, Tasks, Events, and Health. Omits admin, runtime config, provider probes, registration, password reset, and SSO.
5 *
6 * The version of the OpenAPI document: 0.2.0
7 * Contact: maintainers@spectrayan.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// RecallRequestModel : Request model for memory retrieval.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct RecallRequestModel {
17    #[serde(rename = "query")]
18    pub query: String,
19    #[serde(rename = "vector", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
20    pub vector: Option<Option<Vec<f64>>>,
21    #[serde(rename = "limit", skip_serializing_if = "Option::is_none")]
22    pub limit: Option<i32>,
23    #[serde(rename = "profile", skip_serializing_if = "Option::is_none")]
24    pub profile: Option<models::CognitiveProfile>,
25    #[serde(rename = "min_score", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub min_score: Option<Option<f64>>,
27    #[serde(rename = "domain", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub domain: Option<Option<String>>,
29    #[serde(rename = "namespace", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub namespace: Option<Option<String>>,
31    #[serde(rename = "reinforce", skip_serializing_if = "Option::is_none")]
32    pub reinforce: Option<bool>,
33    #[serde(rename = "ablation", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34    pub ablation: Option<Option<std::collections::HashMap<String, serde_json::Value>>>,
35    #[serde(rename = "scoring_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub scoring_mode: Option<Option<String>>,
37}
38
39impl RecallRequestModel {
40    /// Request model for memory retrieval.
41    pub fn new(query: String) -> RecallRequestModel {
42        RecallRequestModel {
43            query,
44            vector: None,
45            limit: None,
46            profile: None,
47            min_score: None,
48            domain: None,
49            namespace: None,
50            reinforce: None,
51            ablation: None,
52            scoring_mode: None,
53        }
54    }
55}
56