Get user profile
client.profile(ProfileParams { containerTag, buckets, filters, 3 more } body, RequestOptionsoptions?): ProfileResponse { profile, searchResults }
POST/v4/profile
Get user profile
import Supermemory from 'supermemory';
const client = new Supermemory({
apiKey: process.env['SUPERMEMORY_API_KEY'], // This is the default and can be omitted
});
const response = await client.profile({ containerTag: 'containerTag' });
console.log(response.profile);{
"profile": {
"buckets": {
"foo": [
"string"
]
},
"dynamic": [
"string"
],
"static": [
"string"
]
},
"searchResults": {
"results": [
{
"id": "mem_abc123",
"metadata": {
"source": "bar",
"confidence": "bar"
},
"similarity": 0.89,
"updatedAt": "updatedAt",
"chunk": "This is a chunk of content from a document...",
"chunks": [
{
"content": "This is a chunk of content from the document...",
"documentId": "doc_xyz789",
"position": 0
}
],
"context": {
"children": [
{
"memory": "Later version: API rate limit increased to 100 req/min on the free tier.",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": 1
}
],
"parents": [
{
"memory": "Earlier version: API rate limit is 50 req/min on the free tier.",
"relation": "updates",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": -1
}
],
"related": [
{
"memory": "memory",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
}
}
]
},
"documents": [
{
"id": "doc_xyz789",
"createdAt": "createdAt",
"updatedAt": "updatedAt",
"metadata": {
"source": "bar",
"language": "bar"
},
"summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
"title": "API Rate Limiting Policy",
"type": "web"
}
],
"filepath": "filepath",
"isAggregated": false,
"memory": "The user prefers detailed API responses over minimal ones.",
"rootMemoryId": "mem_abc123",
"version": 3
}
],
"timing": 0,
"total": 0
}
}Returns Examples
{
"profile": {
"buckets": {
"foo": [
"string"
]
},
"dynamic": [
"string"
],
"static": [
"string"
]
},
"searchResults": {
"results": [
{
"id": "mem_abc123",
"metadata": {
"source": "bar",
"confidence": "bar"
},
"similarity": 0.89,
"updatedAt": "updatedAt",
"chunk": "This is a chunk of content from a document...",
"chunks": [
{
"content": "This is a chunk of content from the document...",
"documentId": "doc_xyz789",
"position": 0
}
],
"context": {
"children": [
{
"memory": "Later version: API rate limit increased to 100 req/min on the free tier.",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": 1
}
],
"parents": [
{
"memory": "Earlier version: API rate limit is 50 req/min on the free tier.",
"relation": "updates",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
},
"version": -1
}
],
"related": [
{
"memory": "memory",
"relation": "extends",
"updatedAt": "updatedAt",
"metadata": {
"foo": "bar"
}
}
]
},
"documents": [
{
"id": "doc_xyz789",
"createdAt": "createdAt",
"updatedAt": "updatedAt",
"metadata": {
"source": "bar",
"language": "bar"
},
"summary": "API rate limit policy: 100 req/min free, 1000 req/min pro.",
"title": "API Rate Limiting Policy",
"type": "web"
}
],
"filepath": "filepath",
"isAggregated": false,
"memory": "The user prefers detailed API responses over minimal ones.",
"rootMemoryId": "mem_abc123",
"version": 3
}
],
"timing": 0,
"total": 0
}
}