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 已建立狀態碼,且沒有回應主體。
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" }