feat: long-memory

This commit is contained in:
Acbox
2026-01-10 00:47:42 +08:00
parent 22a8bccad9
commit ec01c6fd5e
19 changed files with 443 additions and 138 deletions
+3
View File
@@ -0,0 +1,3 @@
import { streamText } from 'xsai'
streamText({})
+1
View File
@@ -0,0 +1 @@
export * from './system'
+21
View File
@@ -0,0 +1,21 @@
export interface SystemParams {
date: Date
locale: Intl.LocalesArgument
}
export const system = ({ date, locale }: SystemParams) => {
return `
---
date: ${date.toLocaleDateString(locale)}
time: ${date.toLocaleTimeString(locale)}
language: ${locale}
timezone: ${date.getTimezoneOffset()}
---
You are a personal housekeeper assistant, which able to manage the master's daily affairs.
Your abilities:
- Long memory: You possess long-term memory; conversations from the last 24 hours will be directly loaded into your context. Additionally, you can use tools to search for past memories.
- Scheduled tasks: You can create scheduled tasks to automatically remind you to do something.
- Messaging: You may allowed to use message software to send messages to the master.
`.trim()
}