Skip to content

Commit c5796a2

Browse files
senamakelmedullabot
andcommitted
fix(api): preserve provider compatibility
Co-authored-by: Medulla <medulla@tinyhumans.ai>
1 parent b193e18 commit c5796a2

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎api/src/provider/content.rs‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
1919
use async_trait::async_trait;
2020

21+
use crate::capabilities::Capability;
2122
use crate::chunks::Chunk;
2223
use crate::error::MemoryError;
2324
use crate::provider::types::{IngestItem, IngestOutcome, SourceScope};
@@ -146,12 +147,16 @@ pub trait MemoryDocuments: Send + Sync {
146147
///
147148
/// # Errors
148149
///
149-
/// Backend failures only; an empty namespace returns empty context.
150+
/// [`MemoryError::Unsupported`] when a provider predating this optional
151+
/// operation does not implement it, otherwise backend failures. An empty
152+
/// namespace returns empty context.
150153
async fn recall_documents(
151154
&self,
152-
namespace: &str,
153-
limit: usize,
154-
) -> Result<NamespaceRetrievalContext, MemoryError>;
155+
_namespace: &str,
156+
_limit: usize,
157+
) -> Result<NamespaceRetrievalContext, MemoryError> {
158+
Err(MemoryError::unsupported(Capability::Documents))
159+
}
155160
}
156161

157162
/// The time-ordered summary tree: buffered leaves rolled up into hour → day →

0 commit comments

Comments
 (0)