Hướng dẫn 5 phút|Không cần thẻ tín dụng
Thêm AI Memory trong 5 phút
Làm theo hướng dẫn từng bước để cung cấp bộ nhớ lâu dài cho AI của bạn. Đánh dấu mỗi bước khi hoàn thành.
Tiến độ0 / 5 bước
0%- Đăng ký hoặc đăng nhập vào tài khoản Seizn
- Đi tới API Keys trong bảng điều khiển
- Nhấp 'Tạo Key mới' và sao chép key của bạn
bash
npm install seizntypescript
import { Seizn } from 'seizn';
const client = new Seizn({ apiKey: process.env.SEIZN_API_KEY });
// Save a memory
const memory = await client.add({
content: "User prefers dark mode and concise responses",
memory_type: "preference",
tags: ["ui", "communication"]
});
console.log('Memory saved:', memory.id);typescript
// Search for relevant memories
const results = await client.search({
query: "What are the user's UI preferences?",
limit: 5,
threshold: 0.7
});
// Use memories in your AI prompt
for (const memory of results) {
console.log(`[${memory.similarity.toFixed(2)}] ${memory.content}`);
}Bạn sẽ thấy phản hồi như thế này khi tìm kiếm bộ nhớ:
json
{
"success": true,
"results": [
{
"id": "mem_a1b2c3d4e5f6",
"content": "User prefers dark mode and concise responses",
"memory_type": "preference",
"tags": ["ui", "communication"],
"similarity": 0.94,
"created_at": "2026-01-15T10:30:00Z"
}
],
"count": 1,
"query_time_ms": 47
}Thành công!
AI của bạn giờ đã có bộ nhớ lâu dài. Sử dụng kết quả tìm kiếm để nâng cao ngữ cảnh và phản hồi của AI.