Interface BaseMemoryService
- All Known Implementing Classes:
InMemoryMemoryService
public interface BaseMemoryService
Base contract for memory services.
The service provides functionalities to ingest sessions into memory so that the memory can be used for user queries.
-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.CompletableaddSessionToMemory(Session session) Adds a session to the memory service.io.reactivex.rxjava3.core.Single<SearchMemoryResponse> searchMemory(String appName, String userId, String query) Searches for sessions that match the query asynchronously.
-
Method Details
-
addSessionToMemory
Adds a session to the memory service.A session may be added multiple times during its lifetime.
- Parameters:
session- The session to add.
-
searchMemory
io.reactivex.rxjava3.core.Single<SearchMemoryResponse> searchMemory(String appName, String userId, String query) Searches for sessions that match the query asynchronously.- Parameters:
appName- The name of the application.userId- The id of the user.query- The query to search for.- Returns:
- A
SearchMemoryResponsecontaining the matching memories.
-