From 1027213fc7b39fe35ce7506537a7e8a8f34c0572 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Fri, 19 Dec 2025 18:52:33 +0800 Subject: [PATCH] feat(web): Add Reflection Engine API --- web/src/api/memory.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/web/src/api/memory.ts b/web/src/api/memory.ts index d6811c06..cce52944 100644 --- a/web/src/api/memory.ts +++ b/web/src/api/memory.ts @@ -11,6 +11,9 @@ import type { import type { ConfigForm as EmotionConfig } from '@/views/EmotionEngine/types' +import type { + ConfigForm as SelfReflectionEngineConfig +} from '@/views/SelfReflectionEngine/types' import type { TestParams } from '@/views/MemoryConversation' import { handleSSE, type SSEMessage } from '@/utils/stream' @@ -164,6 +167,18 @@ export const getMemoryEmotionConfig = (config_id: number | string) => { export const updateMemoryEmotionConfig = (values: EmotionConfig) => { return request.post('/memory/emotion/updated_config', values) } +// 反思引擎-获取配置 +export const getMemoryReflectionConfig = (config_id: number | string) => { + return request.get('/memory/reflection/configs', { config_id: config_id }) +} +// 反思引擎-更新配置 +export const updateMemoryReflectionConfig = (values: SelfReflectionEngineConfig) => { + return request.post('/memory/reflection/save', values) +} +// 反思引擎-试运行 +export const pilotRunMemoryReflectionConfig = (values: { config_id: number | string; dialogue_text: string; }) => { + return request.get('/memory/reflection/run', values) +} /*************** end 记忆管理 相关接口 ******************************/