mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-05-19 07:42:43 +00:00
includeFullDoc: true in search endpoint
This commit is contained in:
parent
1fb521ef72
commit
c0c57a9fe9
2 changed files with 16 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@supermemory/ai-sdk",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"scripts": {
|
||||
"build": "tsdown",
|
||||
"dev": "tsdown --watch",
|
||||
|
|
|
|||
|
|
@ -35,14 +35,27 @@ export function supermemoryTools(
|
|||
informationToGet: z
|
||||
.string()
|
||||
.describe("Terms to search for in the user's memories"),
|
||||
includeFullDocs: z
|
||||
.boolean()
|
||||
.optional()
|
||||
.default(true)
|
||||
.describe(
|
||||
"Whether to include the full document content in the response. Defaults to true for better AI context.",
|
||||
),
|
||||
limit: z
|
||||
.number()
|
||||
.optional()
|
||||
.default(10)
|
||||
.describe("Maximum number of results to return"),
|
||||
}),
|
||||
execute: async ({ informationToGet }) => {
|
||||
execute: async ({ informationToGet, includeFullDocs = true, limit = 10 }) => {
|
||||
try {
|
||||
const response = await client.search.execute({
|
||||
q: informationToGet,
|
||||
containerTags,
|
||||
limit: 10,
|
||||
limit,
|
||||
chunkThreshold: 0.6,
|
||||
includeFullDocs,
|
||||
})
|
||||
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue