Simpler search in the TypeScript SDK #
Call client.search() once instead of client.search.memories() and client.search.documents(). Pass searchMode to return memories, documents, or both.
Improvements
const memories = await client.search({
q: 'What did we decide about pricing?',
searchMode: 'memories',
})
const documents = await client.search({
q: 'onboarding checklist',
searchMode: 'documents',
})
const both = await client.search({
q: 'Simpler search!',
searchMode: 'hybrid',
})