refactor: remove Neo4j-based conversation memory feature
Drop the memory pipeline, API fields, settings UI, and embed toggles so chat no longer depends on Neo4j graph storage for episodic recall.
This commit is contained in:
@@ -26,7 +26,6 @@
|
||||
| `summary_model_id` | string | 否 | 覆盖默认的摘要模型 ID |
|
||||
| `mentioned_items` | object[] | 否 | @提及的知识库和文件列表 |
|
||||
| `disable_title` | bool | 否 | 是否禁用自动标题生成(默认 false) |
|
||||
| `enable_memory` | bool | 否 | 是否启用记忆功能 |
|
||||
| `images` | object[] | 否 | 附带的图片(base64 格式),需要 Agent 启用图片上传 |
|
||||
| `channel` | string | 否 | 来源渠道标识:`web`、`api`、`im`、`browser_extension` |
|
||||
| `suggestion_attribution` | object | 否 | 用户从推荐问题发起本轮时传入 `{suggestion_set_id, question_id}`;服务端会校验归属 |
|
||||
@@ -77,7 +76,6 @@ Agent 模式支持更智能的问答,包括工具调用、网络搜索、多
|
||||
| `summary_model_id` | string | 否 | 覆盖默认的摘要模型 ID |
|
||||
| `mentioned_items` | object[] | 否 | @提及的知识库和文件列表 |
|
||||
| `disable_title` | bool | 否 | 是否禁用自动标题生成(默认 false) |
|
||||
| `enable_memory` | bool | 否 | 是否启用记忆功能 |
|
||||
| `images` | object[] | 否 | 附带的图片(base64 格式),需要 Agent 启用图片上传 |
|
||||
| `channel` | string | 否 | 来源渠道标识:`web`、`api`、`im`、`browser_extension` |
|
||||
| `suggestion_attribution` | object | 否 | 用户从推荐问题发起本轮时传入 `{suggestion_set_id, question_id}`;服务端会校验归属 |
|
||||
|
||||
+1
-12
@@ -19050,7 +19050,7 @@ const docTemplate = `{
|
||||
"type": "boolean"
|
||||
},
|
||||
"preferences": {
|
||||
"description": "Per-user UI/feature preferences (memory toggle, future knobs).\nStored as JSON (jsonb on Postgres, TEXT on SQLite) via the\ndriver.Valuer / sql.Scanner methods on UserPreferences.",
|
||||
"description": "Per-user UI/feature preferences.\nStored as JSON (jsonb on Postgres, TEXT on SQLite) via the\ndriver.Valuer / sql.Scanner methods on UserPreferences.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserPreferences"
|
||||
@@ -19120,10 +19120,6 @@ const docTemplate = `{
|
||||
"github_com_Tencent_WeKnora_internal_types.UserPreferences": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enable_memory": {
|
||||
"description": "EnableMemory mirrors the \"开启记忆功能\" switch in General Settings.\nnil = preference never set (treat as feature default = false)\n*false / *true = user explicitly set the toggle.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"last_active_tenant_id": {
|
||||
"description": "LastActiveTenantID remembers the last workspace the user actively\nswitched into, so a fresh login (new device, cleared browser, new\nrefresh token) lands them back in that workspace instead of always\nbouncing to their home workspace. Login / RefreshToken validate that\nthe workspace still exists and the user still has an active membership\n(or CanAccessAllTenants) before honouring this preference; an\ninvalid pointer is best-effort cleared and the user falls back to\nhome.\n\nnil = no preference (use user.TenantID, i.e. home)\n*0 = \"clear preference\" sentinel for the partial-update endpoint\n (UpdateUserPreferences turns this into nil). Otherwise treat\n a stored *0 the same as nil.\n*N = preferred workspace id.",
|
||||
"type": "integer"
|
||||
@@ -21560,9 +21556,6 @@ const docTemplate = `{
|
||||
"internal_handler.updateMyPreferencesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enable_memory": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"last_active_tenant_id": {
|
||||
"description": "LastActiveTenantID lets the SPA persist \"after a fresh login,\ndrop me back into this workspace\" across devices. Send a positive\nworkspace id to set / replace, or 0 to clear. Membership is validated\nat next login, not here. Nil = field omitted from the PATCH and\nstays untouched.",
|
||||
"type": "integer"
|
||||
@@ -21622,10 +21615,6 @@ const docTemplate = `{
|
||||
"description": "Whether to disable auto title generation",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enable_memory": {
|
||||
"description": "EnableMemory is the per-request override for the memory feature.\nPointer + omitempty so the request can distinguish three states:\n nil = client did not specify; backend falls back to the calling\n user's persisted preference (user.preferences.enable_memory),\n defaulting to false if that's also unset. This is the path\n used by the normal logged-in chat UI now that the toggle is\n stored server-side per user.\n *true / *false = explicit override. Embedded mode forces *false so a\n user's personal memory setting doesn't leak into a widget\n context; older clients that still send a literal bool also\n land here (back-compat).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"images": {
|
||||
"description": "Attached images for multimodal chat",
|
||||
"type": "array",
|
||||
|
||||
+1
-12
@@ -19043,7 +19043,7 @@
|
||||
"type": "boolean"
|
||||
},
|
||||
"preferences": {
|
||||
"description": "Per-user UI/feature preferences (memory toggle, future knobs).\nStored as JSON (jsonb on Postgres, TEXT on SQLite) via the\ndriver.Valuer / sql.Scanner methods on UserPreferences.",
|
||||
"description": "Per-user UI/feature preferences.\nStored as JSON (jsonb on Postgres, TEXT on SQLite) via the\ndriver.Valuer / sql.Scanner methods on UserPreferences.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/github_com_Tencent_WeKnora_internal_types.UserPreferences"
|
||||
@@ -19113,10 +19113,6 @@
|
||||
"github_com_Tencent_WeKnora_internal_types.UserPreferences": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enable_memory": {
|
||||
"description": "EnableMemory mirrors the \"开启记忆功能\" switch in General Settings.\nnil = preference never set (treat as feature default = false)\n*false / *true = user explicitly set the toggle.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"last_active_tenant_id": {
|
||||
"description": "LastActiveTenantID remembers the last workspace the user actively\nswitched into, so a fresh login (new device, cleared browser, new\nrefresh token) lands them back in that workspace instead of always\nbouncing to their home workspace. Login / RefreshToken validate that\nthe workspace still exists and the user still has an active membership\n(or CanAccessAllTenants) before honouring this preference; an\ninvalid pointer is best-effort cleared and the user falls back to\nhome.\n\nnil = no preference (use user.TenantID, i.e. home)\n*0 = \"clear preference\" sentinel for the partial-update endpoint\n (UpdateUserPreferences turns this into nil). Otherwise treat\n a stored *0 the same as nil.\n*N = preferred workspace id.",
|
||||
"type": "integer"
|
||||
@@ -21553,9 +21549,6 @@
|
||||
"internal_handler.updateMyPreferencesRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enable_memory": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"last_active_tenant_id": {
|
||||
"description": "LastActiveTenantID lets the SPA persist \"after a fresh login,\ndrop me back into this workspace\" across devices. Send a positive\nworkspace id to set / replace, or 0 to clear. Membership is validated\nat next login, not here. Nil = field omitted from the PATCH and\nstays untouched.",
|
||||
"type": "integer"
|
||||
@@ -21615,10 +21608,6 @@
|
||||
"description": "Whether to disable auto title generation",
|
||||
"type": "boolean"
|
||||
},
|
||||
"enable_memory": {
|
||||
"description": "EnableMemory is the per-request override for the memory feature.\nPointer + omitempty so the request can distinguish three states:\n nil = client did not specify; backend falls back to the calling\n user's persisted preference (user.preferences.enable_memory),\n defaulting to false if that's also unset. This is the path\n used by the normal logged-in chat UI now that the toggle is\n stored server-side per user.\n *true / *false = explicit override. Embedded mode forces *false so a\n user's personal memory setting doesn't leak into a widget\n context; older clients that still send a literal bool also\n land here (back-compat).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"images": {
|
||||
"description": "Attached images for multimodal chat",
|
||||
"type": "array",
|
||||
|
||||
+1
-23
@@ -3608,7 +3608,7 @@ definitions:
|
||||
allOf:
|
||||
- $ref: '#/definitions/github_com_Tencent_WeKnora_internal_types.UserPreferences'
|
||||
description: |-
|
||||
Per-user UI/feature preferences (memory toggle, future knobs).
|
||||
Per-user UI/feature preferences.
|
||||
Stored as JSON (jsonb on Postgres, TEXT on SQLite) via the
|
||||
driver.Valuer / sql.Scanner methods on UserPreferences.
|
||||
tenant:
|
||||
@@ -3652,12 +3652,6 @@ definitions:
|
||||
type: object
|
||||
github_com_Tencent_WeKnora_internal_types.UserPreferences:
|
||||
properties:
|
||||
enable_memory:
|
||||
description: |-
|
||||
EnableMemory mirrors the "开启记忆功能" switch in General Settings.
|
||||
nil = preference never set (treat as feature default = false)
|
||||
*false / *true = user explicitly set the toggle.
|
||||
type: boolean
|
||||
last_active_tenant_id:
|
||||
description: |-
|
||||
LastActiveTenantID remembers the last workspace the user actively
|
||||
@@ -5435,8 +5429,6 @@ definitions:
|
||||
type: object
|
||||
internal_handler.updateMyPreferencesRequest:
|
||||
properties:
|
||||
enable_memory:
|
||||
type: boolean
|
||||
last_active_tenant_id:
|
||||
description: |-
|
||||
LastActiveTenantID lets the SPA persist "after a fresh login,
|
||||
@@ -5483,20 +5475,6 @@ definitions:
|
||||
disable_title:
|
||||
description: Whether to disable auto title generation
|
||||
type: boolean
|
||||
enable_memory:
|
||||
description: |-
|
||||
EnableMemory is the per-request override for the memory feature.
|
||||
Pointer + omitempty so the request can distinguish three states:
|
||||
nil = client did not specify; backend falls back to the calling
|
||||
user's persisted preference (user.preferences.enable_memory),
|
||||
defaulting to false if that's also unset. This is the path
|
||||
used by the normal logged-in chat UI now that the toggle is
|
||||
stored server-side per user.
|
||||
*true / *false = explicit override. Embedded mode forces *false so a
|
||||
user's personal memory setting doesn't leak into a widget
|
||||
context; older clients that still send a literal bool also
|
||||
land here (back-compat).
|
||||
type: boolean
|
||||
images:
|
||||
description: Attached images for multimodal chat
|
||||
items:
|
||||
|
||||
Reference in New Issue
Block a user