mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-08-28 05:25:33 +00:00
fix(tools): coerce limit/offset in ai-sdk schemas (#1202)
Co-authored-by: Dhravya Shah <dhravyashah@gmail.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
5567e82377
commit
e5e4e498f2
1 changed files with 5 additions and 5 deletions
|
|
@ -40,11 +40,11 @@ export const searchMemoriesTool = (
|
|||
.default(DEFAULT_VALUES.includeFullDocs)
|
||||
.describe(PARAMETER_DESCRIPTIONS.includeFullDocs),
|
||||
limit: strict
|
||||
? z
|
||||
? z.coerce
|
||||
.number()
|
||||
.default(DEFAULT_VALUES.limit)
|
||||
.describe(PARAMETER_DESCRIPTIONS.limit)
|
||||
: z
|
||||
: z.coerce
|
||||
.number()
|
||||
.optional()
|
||||
.default(DEFAULT_VALUES.limit)
|
||||
|
|
@ -183,16 +183,16 @@ export const documentListTool = (
|
|||
.optional()
|
||||
.describe(PARAMETER_DESCRIPTIONS.containerTag),
|
||||
limit: strict
|
||||
? z
|
||||
? z.coerce
|
||||
.number()
|
||||
.default(DEFAULT_VALUES.limit)
|
||||
.describe(PARAMETER_DESCRIPTIONS.limit)
|
||||
: z
|
||||
: z.coerce
|
||||
.number()
|
||||
.optional()
|
||||
.default(DEFAULT_VALUES.limit)
|
||||
.describe(PARAMETER_DESCRIPTIONS.limit),
|
||||
page: z.number().optional().describe(PARAMETER_DESCRIPTIONS.page),
|
||||
page: z.coerce.number().optional().describe(PARAMETER_DESCRIPTIONS.page),
|
||||
}),
|
||||
execute: async ({ containerTag, limit, page }) => {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue