Merge #20 into develop_web from feature/20251219_zy
feat(web): remove mock data * feature/20251219_zy: (5 commits) feat(web): update api key feat(web): Add Emotion Memory feat(web): Add Reflection Engine feat(web): Add Reflection Engine API feat(web): remove mock data Signed-off-by: zhaoying <zhaoying@redbearai.com> Merged-by: zhaoying <zhaoying@redbearai.com> CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/20
This commit is contained in:
@@ -8,6 +8,12 @@ import type {
|
||||
import type {
|
||||
ConfigForm as ExtractionConfigForm
|
||||
} from '@/views/MemoryExtractionEngine/types'
|
||||
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'
|
||||
|
||||
@@ -96,6 +102,23 @@ export const getChunkInsight = (end_user_id: string) => {
|
||||
export const getRagContent = (end_user_id: string) => {
|
||||
return request.get(`/dashboard/rag_content`, { end_user_id, limit: 20 })
|
||||
}
|
||||
// 情感分布分析
|
||||
export const getWordCloud = (group_id: string) => {
|
||||
return request.post(`/memory/emotion/wordcloud`, { group_id, limit: 20 })
|
||||
}
|
||||
// 高频情绪关键词
|
||||
export const getEmotionTags = (group_id: string) => {
|
||||
return request.post(`/memory/emotion/tags`, { group_id, limit: 20 })
|
||||
}
|
||||
// 情绪健康指数
|
||||
export const getEmotionHealth = (group_id: string) => {
|
||||
return request.post(`/memory/emotion/health`, { group_id, limit: 20 })
|
||||
}
|
||||
// 个性化建议
|
||||
export const getEmotionSuggestions = (group_id: string) => {
|
||||
return request.post(`/memory/emotion/suggestions`, { group_id, limit: 20 })
|
||||
}
|
||||
|
||||
/*************** end 用户记忆 相关接口 ******************************/
|
||||
|
||||
/****************** 记忆管理 相关接口 *******************************/
|
||||
@@ -136,6 +159,27 @@ export const updateMemoryExtractionConfig = (values: ExtractionConfigForm) => {
|
||||
export const pilotRunMemoryExtractionConfig = (values: { config_id: number | string; dialogue_text: string; }, onMessage?: (data: SSEMessage[]) => void) => {
|
||||
return handleSSE('/memory-storage/pilot_run', values, onMessage)
|
||||
}
|
||||
// 情绪引擎-获取配置
|
||||
export const getMemoryEmotionConfig = (config_id: number | string) => {
|
||||
return request.get('/memory/emotion/read_config', { config_id: config_id })
|
||||
}
|
||||
// 情绪引擎-更新配置
|
||||
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 记忆管理 相关接口 ******************************/
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user