Skip to content

Commit 8cc04dd

Browse files
committed
docs: add experimental
1 parent ee10986 commit 8cc04dd

File tree

4 files changed

+277
-3
lines changed

4 files changed

+277
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'Import Memory from Text'
3+
openapi: POST /api/v1/users/profile/import/{user_id}
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'Proactive Topics'
3+
openapi: "POST /api/v1/users/roleplay/proactive/{user_id}"
4+
---

docs/site/docs.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,13 @@
143143
"pages": [
144144
"api-reference/prompt/get_context"
145145
]
146+
},
147+
{
148+
"group": "Experimental",
149+
"pages": [
150+
"api-reference/experimental/import_memory",
151+
"api-reference/experimental/proactive_topic"
152+
]
146153
}
147154
]
148155
}

docs/site/openapi.json

Lines changed: 262 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "Memobase API",
55
"summary": "APIs for Memobase, a user memory system for LLM Apps",
6-
"version": "0.0.33"
6+
"version": "0.0.34"
77
},
88
"servers": [
99
{
@@ -1067,7 +1067,7 @@
10671067
"profile"
10681068
],
10691069
"summary": "Delete User Profile",
1070-
"description": "Get the real-time user profiles for long term memory",
1070+
"description": "Delete a profile",
10711071
"operationId": "delete_user_profile_api_v1_users_profile__user_id___profile_id__delete",
10721072
"parameters": [
10731073
{
@@ -1140,7 +1140,7 @@
11401140
"buffer"
11411141
],
11421142
"summary": "Flush Buffer",
1143-
"description": "Get the real-time user profiles for long term memory",
1143+
"description": "Flush unprocessed blobs into Memory",
11441144
"operationId": "flush_buffer_api_v1_users_buffer__user_id___buffer_type__post",
11451145
"parameters": [
11461146
{
@@ -1692,6 +1692,134 @@
16921692
}
16931693
]
16941694
}
1695+
},
1696+
"/api/v1/users/roleplay/proactive/{user_id}": {
1697+
"post": {
1698+
"tags": [
1699+
"roleplay"
1700+
],
1701+
"summary": "Infer Proactive Topics",
1702+
"description": "Provide interest detection and personalized topics",
1703+
"operationId": "infer_proactive_topics_api_v1_users_roleplay_proactive__user_id__post",
1704+
"parameters": [
1705+
{
1706+
"name": "user_id",
1707+
"in": "path",
1708+
"required": true,
1709+
"schema": {
1710+
"type": "string",
1711+
"description": "The ID of the user",
1712+
"title": "User Id"
1713+
},
1714+
"description": "The ID of the user"
1715+
},
1716+
{
1717+
"name": "topk",
1718+
"in": "query",
1719+
"required": false,
1720+
"schema": {
1721+
"type": "integer",
1722+
"description": "Number of profiles to retrieve, default is all",
1723+
"title": "Topk"
1724+
},
1725+
"description": "Number of profiles to retrieve, default is all"
1726+
},
1727+
{
1728+
"name": "max_token_size",
1729+
"in": "query",
1730+
"required": false,
1731+
"schema": {
1732+
"type": "integer",
1733+
"description": "Max token size of returned profile content, default is all",
1734+
"title": "Max Token Size"
1735+
},
1736+
"description": "Max token size of returned profile content, default is all"
1737+
},
1738+
{
1739+
"name": "prefer_topics",
1740+
"in": "query",
1741+
"required": false,
1742+
"schema": {
1743+
"type": "array",
1744+
"items": {
1745+
"type": "string"
1746+
},
1747+
"description": "Rank prefer topics at first to try to keep them in filtering, default order is by updated time",
1748+
"title": "Prefer Topics"
1749+
},
1750+
"description": "Rank prefer topics at first to try to keep them in filtering, default order is by updated time"
1751+
},
1752+
{
1753+
"name": "only_topics",
1754+
"in": "query",
1755+
"required": false,
1756+
"schema": {
1757+
"type": "array",
1758+
"items": {
1759+
"type": "string"
1760+
},
1761+
"description": "Only return profiles with these topics, default is all",
1762+
"title": "Only Topics"
1763+
},
1764+
"description": "Only return profiles with these topics, default is all"
1765+
},
1766+
{
1767+
"name": "max_subtopic_size",
1768+
"in": "query",
1769+
"required": false,
1770+
"schema": {
1771+
"type": "integer",
1772+
"description": "Max subtopic size of the same topic in returned profile, default is all",
1773+
"title": "Max Subtopic Size"
1774+
},
1775+
"description": "Max subtopic size of the same topic in returned profile, default is all"
1776+
},
1777+
{
1778+
"name": "topic_limits_json",
1779+
"in": "query",
1780+
"required": false,
1781+
"schema": {
1782+
"type": "string",
1783+
"description": "Set specific subtopic limits for topics in JSON, for example {\"topic1\": 3, \"topic2\": 5}. The limits in this param will override `max_subtopic_size`.",
1784+
"title": "Topic Limits Json"
1785+
},
1786+
"description": "Set specific subtopic limits for topics in JSON, for example {\"topic1\": 3, \"topic2\": 5}. The limits in this param will override `max_subtopic_size`."
1787+
}
1788+
],
1789+
"requestBody": {
1790+
"required": true,
1791+
"content": {
1792+
"application/json": {
1793+
"schema": {
1794+
"$ref": "#/components/schemas/ProactiveTopicRequest",
1795+
"description": "The body of the request"
1796+
}
1797+
}
1798+
}
1799+
},
1800+
"responses": {
1801+
"200": {
1802+
"description": "Successful Response",
1803+
"content": {
1804+
"application/json": {
1805+
"schema": {
1806+
"$ref": "#/components/schemas/ProactiveTopicResponse"
1807+
}
1808+
}
1809+
}
1810+
},
1811+
"422": {
1812+
"description": "Validation Error",
1813+
"content": {
1814+
"application/json": {
1815+
"schema": {
1816+
"$ref": "#/components/schemas/HTTPValidationError"
1817+
}
1818+
}
1819+
}
1820+
}
1821+
}
1822+
}
16951823
}
16961824
},
16971825
"components": {
@@ -2305,6 +2433,137 @@
23052433
"type": "object",
23062434
"title": "IdsResponse"
23072435
},
2436+
"OpenAICompatibleMessage": {
2437+
"properties": {
2438+
"role": {
2439+
"type": "string",
2440+
"enum": [
2441+
"user",
2442+
"assistant"
2443+
],
2444+
"title": "Role"
2445+
},
2446+
"content": {
2447+
"type": "string",
2448+
"title": "Content"
2449+
},
2450+
"alias": {
2451+
"anyOf": [
2452+
{
2453+
"type": "string"
2454+
},
2455+
{
2456+
"type": "null"
2457+
}
2458+
],
2459+
"title": "Alias"
2460+
},
2461+
"created_at": {
2462+
"anyOf": [
2463+
{
2464+
"type": "string"
2465+
},
2466+
{
2467+
"type": "null"
2468+
}
2469+
],
2470+
"title": "Created At"
2471+
}
2472+
},
2473+
"type": "object",
2474+
"required": [
2475+
"role",
2476+
"content"
2477+
],
2478+
"title": "OpenAICompatibleMessage"
2479+
},
2480+
"ProactiveTopicData": {
2481+
"properties": {
2482+
"action": {
2483+
"type": "string",
2484+
"enum": [
2485+
"new_topic",
2486+
"continue"
2487+
],
2488+
"title": "Action",
2489+
"description": "The action to take"
2490+
},
2491+
"topic_prompt": {
2492+
"anyOf": [
2493+
{
2494+
"type": "string"
2495+
},
2496+
{
2497+
"type": "null"
2498+
}
2499+
],
2500+
"title": "Topic Prompt",
2501+
"description": "The topic prompt, insert it to your latest user message or system prompt"
2502+
}
2503+
},
2504+
"type": "object",
2505+
"required": [
2506+
"action"
2507+
],
2508+
"title": "ProactiveTopicData"
2509+
},
2510+
"ProactiveTopicRequest": {
2511+
"properties": {
2512+
"messages": {
2513+
"items": {
2514+
"$ref": "#/components/schemas/OpenAICompatibleMessage"
2515+
},
2516+
"type": "array",
2517+
"title": "Messages",
2518+
"description": "The latest messages between user/assistant"
2519+
},
2520+
"agent_context": {
2521+
"anyOf": [
2522+
{
2523+
"type": "string"
2524+
},
2525+
{
2526+
"type": "null"
2527+
}
2528+
],
2529+
"title": "Agent Context",
2530+
"description": "The agent's roleplay prompt"
2531+
}
2532+
},
2533+
"type": "object",
2534+
"required": [
2535+
"messages"
2536+
],
2537+
"title": "ProactiveTopicRequest"
2538+
},
2539+
"ProactiveTopicResponse": {
2540+
"properties": {
2541+
"data": {
2542+
"anyOf": [
2543+
{
2544+
"$ref": "#/components/schemas/ProactiveTopicData"
2545+
},
2546+
{
2547+
"type": "null"
2548+
}
2549+
],
2550+
"description": "Response containing proactive topic data"
2551+
},
2552+
"errno": {
2553+
"$ref": "#/components/schemas/CODE",
2554+
"description": "Error code, 0 means success",
2555+
"default": 0
2556+
},
2557+
"errmsg": {
2558+
"type": "string",
2559+
"title": "Errmsg",
2560+
"description": "Error message, empty when success",
2561+
"default": ""
2562+
}
2563+
},
2564+
"type": "object",
2565+
"title": "ProactiveTopicResponse"
2566+
},
23082567
"ProfileConfigData": {
23092568
"properties": {
23102569
"profile_config": {

0 commit comments

Comments
 (0)