mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-17 12:20:04 +00:00
Expose raw search results in `MemoryPromptData` so prompt templates can traverse, filter, and selectively include results based on metadata (e.g. score, source).
##### Usage example
```typescript
const promptTemplate = (data: MemoryPromptData) => {
const relevant = data.searchResults.filter(
(r) => (r.metadata?.score as number) > 0.7
)
return `${data.userMemories}\n${relevant.map(r => r.memory).join('\n')}`
}
```
|
||
|---|---|---|
| .. | ||
| examples.mdx | ||
| infinite-chat.mdx | ||
| memory-tools.mdx | ||
| npm.mdx | ||
| overview.mdx | ||
| user-profiles.mdx | ||