aboutsummaryrefslogtreecommitdiff
path: root/apps/docs
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-10-03 02:37:30 -0700
committerDhravya Shah <[email protected]>2025-10-03 02:37:30 -0700
commitc65f4e97ac1a41272da2cc59ec1e2d6a88efbd70 (patch)
tree66f2a7cc36da315ce82fb30fc1f1408d69409133 /apps/docs
parentfix: tools files (diff)
downloadsupermemory-c65f4e97ac1a41272da2cc59ec1e2d6a88efbd70.tar.xz
supermemory-c65f4e97ac1a41272da2cc59ec1e2d6a88efbd70.zip
fix: docs
Diffstat (limited to 'apps/docs')
-rw-r--r--apps/docs/ai-sdk/examples.mdx13
-rw-r--r--apps/docs/cookbook/ai-sdk-integration.mdx14
-rw-r--r--apps/docs/cookbook/personal-assistant.mdx4
-rw-r--r--apps/docs/memory-api/sdks/openai-plugins.mdx2
4 files changed, 8 insertions, 25 deletions
diff --git a/apps/docs/ai-sdk/examples.mdx b/apps/docs/ai-sdk/examples.mdx
index a0827e6c..cb2b1a7f 100644
--- a/apps/docs/ai-sdk/examples.mdx
+++ b/apps/docs/ai-sdk/examples.mdx
@@ -101,9 +101,7 @@ export async function POST(request: Request) {
model: openai('gpt-4-turbo'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-user-id': customerId
- }
+ containerTags: [customerId]
}),
system: `You are a customer support agent. Before responding to any query:
1. Search for the customer's previous interactions and issues
@@ -192,10 +190,7 @@ export async function POST(request: Request) {
model: anthropic('claude-3-haiku-20240307'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-user-id': userId,
- 'x-sm-conversation-id': `course-${courseId}`
- }
+ containerTags: [userId]
}),
system: `You are a learning assistant. Help students with their coursework by:
1. Remembering their learning progress and struggles
@@ -230,9 +225,7 @@ export async function POST(request: Request) {
model: openai('gpt-4-turbo'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-conversation-id': projectId
- }
+ containerTags: [projectId]
}),
system: `You are a research assistant. You can:
1. Search through uploaded research papers and documents
diff --git a/apps/docs/cookbook/ai-sdk-integration.mdx b/apps/docs/cookbook/ai-sdk-integration.mdx
index 1bf217af..9bde2f42 100644
--- a/apps/docs/cookbook/ai-sdk-integration.mdx
+++ b/apps/docs/cookbook/ai-sdk-integration.mdx
@@ -100,10 +100,7 @@ export async function POST(request: Request) {
model: openai('gpt-4-turbo'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-user-id': customerId,
- 'x-sm-conversation-id': 'customer-support'
- }
+ containerTags: [customerId]
}),
system: `You are a customer support agent. Before responding to any query:
1. Search for the customer's previous interactions and issues
@@ -192,10 +189,7 @@ export async function POST(request: Request) {
model: anthropic('claude-3-haiku-20240307'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-user-id': userId,
- 'x-sm-conversation-id': `course-${courseId}`
- }
+ containerTags: [userId]
}),
system: `You are a learning assistant. Help students with their coursework by:
1. Remembering their learning progress and struggles
@@ -230,9 +224,7 @@ export async function POST(request: Request) {
model: openai('gpt-4-turbo'),
messages,
tools: supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- headers: {
- 'x-sm-conversation-id': projectId
- }
+ containerTags: [projectId]
}),
system: `You are a research assistant. You can:
1. Search through uploaded research papers and documents
diff --git a/apps/docs/cookbook/personal-assistant.mdx b/apps/docs/cookbook/personal-assistant.mdx
index edaeed83..db999100 100644
--- a/apps/docs/cookbook/personal-assistant.mdx
+++ b/apps/docs/cookbook/personal-assistant.mdx
@@ -627,9 +627,7 @@ Check that memories are being stored properly:
```typescript
// Always use user-specific container tags
const tools = supermemoryTools(apiKey, {
- headers: {
- 'x-sm-user-id': userId
- }
+ containerTags: [userId]
})
```
diff --git a/apps/docs/memory-api/sdks/openai-plugins.mdx b/apps/docs/memory-api/sdks/openai-plugins.mdx
index 2fb0a789..6550cee3 100644
--- a/apps/docs/memory-api/sdks/openai-plugins.mdx
+++ b/apps/docs/memory-api/sdks/openai-plugins.mdx
@@ -142,7 +142,7 @@ tools = SupermemoryTools(
import { supermemoryTools } from "@supermemory/tools/openai"
const tools = supermemoryTools(process.env.SUPERMEMORY_API_KEY!, {
- projectId: "your-project-id",
+ containerTags: ["your-user-id"],
baseUrl: "https://custom-endpoint.com", // optional
})
```