OpenAI SDK Backfill (#771)

This commit is contained in:
sreedharsreeram 2026-03-06 23:57:10 +00:00 committed by Sreeram Sreedhar
parent 0e1f062fa9
commit 2c893c6122
3 changed files with 23 additions and 12 deletions

View file

@ -135,8 +135,14 @@ export const getProfileTool = (
inputSchema: z.object({
containerTag: strict
? z.string().describe(PARAMETER_DESCRIPTIONS.containerTag)
: z.string().optional().describe(PARAMETER_DESCRIPTIONS.containerTag),
query: z.string().optional().describe(PARAMETER_DESCRIPTIONS.query),
: z
.string()
.optional()
.describe(PARAMETER_DESCRIPTIONS.containerTag),
query: z
.string()
.optional()
.describe(PARAMETER_DESCRIPTIONS.query),
}),
execute: async ({ containerTag, query }) => {
try {
@ -191,8 +197,14 @@ export const documentListTool = (
.optional()
.default(DEFAULT_VALUES.limit)
.describe(PARAMETER_DESCRIPTIONS.limit),
offset: z.number().optional().describe(PARAMETER_DESCRIPTIONS.offset),
status: z.string().optional().describe(PARAMETER_DESCRIPTIONS.status),
offset: z
.number()
.optional()
.describe(PARAMETER_DESCRIPTIONS.offset),
status: z
.string()
.optional()
.describe(PARAMETER_DESCRIPTIONS.status),
}),
execute: async ({ containerTag, limit, offset, status }) => {
try {
@ -317,7 +329,10 @@ export const memoryForgetTool = (
.string()
.optional()
.describe(PARAMETER_DESCRIPTIONS.containerTag),
memoryId: z.string().optional().describe(PARAMETER_DESCRIPTIONS.memoryId),
memoryId: z
.string()
.optional()
.describe(PARAMETER_DESCRIPTIONS.memoryId),
memoryContent: z
.string()
.optional()

View file

@ -37,9 +37,7 @@ export interface ProfileResult {
export interface DocumentListResult {
success: boolean
documents?: Awaited<ReturnType<Supermemory["documents"]["list"]>>["documents"]
pagination?: Awaited<
ReturnType<Supermemory["documents"]["list"]>
>["pagination"]
pagination?: Awaited<ReturnType<Supermemory["documents"]["list"]>>["pagination"]
error?: string
}

View file

@ -31,15 +31,13 @@ export const PARAMETER_DESCRIPTIONS = {
containerTag: "Tag to filter/scope the operation (e.g., user ID, project ID)",
query: "Optional search query to include relevant search results",
offset: "Number of items to skip for pagination (default: 0)",
status:
"Filter documents by processing status (e.g., 'completed', 'processing', 'failed')",
status: "Filter documents by processing status (e.g., 'completed', 'processing', 'failed')",
documentId: "The unique identifier of the document to operate on",
content: "The content to add - can be text, URL, or other supported formats",
title: "Optional title for the document",
description: "Optional description for the document",
memoryId: "The unique identifier of the memory entry",
memoryContent:
"Exact content match of the memory entry to operate on (alternative to ID)",
memoryContent: "Exact content match of the memory entry to operate on (alternative to ID)",
reason: "Optional reason for forgetting this memory",
} as const