内存服务(Service)

interface MemoryService

Base contract for memory services.

The service provides functionalities to ingest sessions into memory so that the memory can be used for user queries.

Inheritors

函数

Link copied to clipboard
open suspend fun addEventsToMemory(appName: String, userId: String, events: List<Event>, sessionId: String? = null, customMetadata: Map<String, Any?>? = null)

向内存服务中添加一个明确指定的事件列表。

Link copied to clipboard
open suspend fun addMemory(appName: String, userId: String, memories: List<MemoryEntry>, customMetadata: Map<String, Any?>? = null)

将明确指定的内存项直接添加到内存服务中。

Link copied to clipboard
abstract suspend fun addSessionToMemory(session: Session)

将一个会话添加到内存服务中。

Link copied to clipboard
abstract suspend fun searchMemory(appName: String, userId: String, query: String): SearchMemoryResponse

异步地搜索与查询条件匹配的会话(session)。