Last updated 2 days ago
curl -X POST \ https://api.rememberizer.ai/api/v1/documents/memorize/ \ -H "Authorization: Bearer YOUR_JWT_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "重要信息", "content": "这是我希望 Rememberizer 记住的重要内容。" }'
将 YOUR_JWT_TOKEN 替换为您的实际 JWT 令牌。
YOUR_JWT_TOKEN
const memorizeContent = async () => { const response = await fetch('https://api.rememberizer.ai/api/v1/documents/memorize/', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_JWT_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: '重要信息', content: '这是我希望 Rememberizer 记住的重要内容。' }) }); if (response.status === 201) { console.log("内容成功存储"); } else { console.error("存储内容失败"); const errorData = await response.json(); console.error(errorData); } }; memorizeContent();
import requests import json def memorize_content(): headers = { "Authorization": "Bearer YOUR_JWT_TOKEN", "Content-Type": "application/json" } payload = { "name": "重要信息", "content": "这是我希望 Rememberizer 记住的重要内容。" } response = requests.post( "https://api.rememberizer.ai/api/v1/documents/memorize/", headers=headers, data=json.dumps(payload) ) if response.status_code == 201: print("内容成功存储") else: print(f"存储内容失败: {response.text}") memorize_content()
name
字符串
必填。 存储内容的名称。
content
必填。 要存储在 Rememberizer 中的文本内容。
成功的请求返回一个 201 Created 状态码,且没有响应体。
400
错误请求 - 缺少必填字段或无效参数
401
未授权 - 无效或缺失的身份验证
500
服务器内部错误
此端点特别适用于:
存储您希望稍后访问的重要笔记或信息
添加通过集成数据源无法获得的内容
手动添加需要可搜索的信息
为访问您的知识库的 LLM 添加上下文信息
存储的内容可以通过搜索端点进行搜索,并可以包含在纪念品中。
Saves a document with a name and content
POST /api/v1/documents/memorize/ HTTP/1.1 Host: api.rememberizer.ai Content-Type: application/json Accept: */* Content-Length: 32 { "name": "text", "content": "text" }
Document saved successfully
{ "data": [ {} ], "message": "text", "code": "text" }