将会话写入记忆
curl --request PATCH \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/memory \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "session-001"
}
'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/memory"
payload = { "sessionId": "session-001" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'session-001'})
};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/memory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}记忆
将会话写入记忆
将 sessionId 对应会话交给配置的记忆服务处理;成功返回 JSON null
PATCH
/
apps
/
{app_name}
/
users
/
{user_id}
/
memory
将会话写入记忆
curl --request PATCH \
--url http://localhost:8000/apps/{app_name}/users/{user_id}/memory \
--header 'Content-Type: application/json' \
--data '
{
"sessionId": "session-001"
}
'import requests
url = "http://localhost:8000/apps/{app_name}/users/{user_id}/memory"
payload = { "sessionId": "session-001" }
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({sessionId: 'session-001'})
};
fetch('http://localhost:8000/apps/{app_name}/users/{user_id}/memory', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));null{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}最后修改于 2026年9月19日