顧客檔案:跨對話的記憶
對方提供的每項資料,都用函式儲存起來。如果一個月後他再傳訊息,AI 代理不必重讀整段紀錄,就知道他問過什麼、買過什麼。
{
"name": "registrar_lead",
"description": "在 CRM 中儲存或更新顧客檔案",
"parameters": {
"type": "object",
"properties": {
"nombre": { "type": "string" },
"fecha_entrada": { "type": "string", "format": "date" },
"noches": { "type": "integer", "minimum": 1 },
"personas": { "type": "integer", "minimum": 1 },
"presupuesto": { "type": "number" },
"interes": { "type": "string", "enum": ["estadia", "cena", "evento", "otro"] },
"etapa": { "type": "string", "enum": ["nuevo", "calificado", "cotizado", "pagado"] }
},
"required": ["etapa"]
}
}建議。 用函式儲存資料,而不是留在對話的自由文字裡:這樣才能篩選、計數,並用於後續追蹤。