|
3 | 3 | "info": { |
4 | 4 | "title": "Memobase API", |
5 | 5 | "summary": "APIs for Memobase, a user memory system for LLM Apps", |
6 | | - "version": "0.0.33" |
| 6 | + "version": "0.0.34" |
7 | 7 | }, |
8 | 8 | "servers": [ |
9 | 9 | { |
|
1067 | 1067 | "profile" |
1068 | 1068 | ], |
1069 | 1069 | "summary": "Delete User Profile", |
1070 | | - "description": "Get the real-time user profiles for long term memory", |
| 1070 | + "description": "Delete a profile", |
1071 | 1071 | "operationId": "delete_user_profile_api_v1_users_profile__user_id___profile_id__delete", |
1072 | 1072 | "parameters": [ |
1073 | 1073 | { |
|
1140 | 1140 | "buffer" |
1141 | 1141 | ], |
1142 | 1142 | "summary": "Flush Buffer", |
1143 | | - "description": "Get the real-time user profiles for long term memory", |
| 1143 | + "description": "Flush unprocessed blobs into Memory", |
1144 | 1144 | "operationId": "flush_buffer_api_v1_users_buffer__user_id___buffer_type__post", |
1145 | 1145 | "parameters": [ |
1146 | 1146 | { |
|
1692 | 1692 | } |
1693 | 1693 | ] |
1694 | 1694 | } |
| 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 | + } |
1695 | 1823 | } |
1696 | 1824 | }, |
1697 | 1825 | "components": { |
|
2305 | 2433 | "type": "object", |
2306 | 2434 | "title": "IdsResponse" |
2307 | 2435 | }, |
| 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 | + }, |
2308 | 2567 | "ProfileConfigData": { |
2309 | 2568 | "properties": { |
2310 | 2569 | "profile_config": { |
|
0 commit comments