Commit 940981b8 authored by nick zheng's avatar nick zheng

Merge branch 'beta' into 'master'

fix: 应用AI自动配置角色指令生成内容不匹配

See merge request !28
parents 86300f53 10f18ed0
...@@ -366,7 +366,7 @@ async function handleSettingAgent(autoConfigInputValue: string) { ...@@ -366,7 +366,7 @@ async function handleSettingAgent(autoConfigInputValue: string) {
handleAIGenerateAgentAvatar(), handleAIGenerateAgentAvatar(),
handleAIGeneratePreamble(), handleAIGeneratePreamble(),
handleAIGenerateFeaturedQuestions(), handleAIGenerateFeaturedQuestions(),
handleAIGenerateAgentSystem(autoConfigInputValue), handleAIGenerateAgentSystem(),
]).finally(() => { ]).finally(() => {
isFullScreenLoading.value = false isFullScreenLoading.value = false
}) })
...@@ -394,7 +394,7 @@ function handleSettingAgentSystem(agentSystem: string) { ...@@ -394,7 +394,7 @@ function handleSettingAgentSystem(agentSystem: string) {
isShowOptimizeAgentSystemModal.value = false isShowOptimizeAgentSystemModal.value = false
} }
function handleAIGenerateAgentSystem(autoConfigInputValue: string) { function handleAIGenerateAgentSystem() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
personalAppConfig.value.baseInfo.agentSystem = '' personalAppConfig.value.baseInfo.agentSystem = ''
generateAgentSystemController = new AbortController() generateAgentSystemController = new AbortController()
...@@ -402,7 +402,7 @@ function handleAIGenerateAgentSystem(autoConfigInputValue: string) { ...@@ -402,7 +402,7 @@ function handleAIGenerateAgentSystem(autoConfigInputValue: string) {
fetchCustomEventSource({ fetchCustomEventSource({
path: '/api/rest/agentApplicationInfoRest/createAgentSystem.json', path: '/api/rest/agentApplicationInfoRest/createAgentSystem.json',
payload: { payload: {
input: autoConfigInputValue || personalAppConfigStore.baseInfo.agentSystem, input: personalAppConfigStore.baseInfo.agentTitle || personalAppConfigStore.baseInfo.agentSystem,
}, },
controller: generateAgentSystemController, controller: generateAgentSystemController,
onMessage: (data: any) => { onMessage: (data: any) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment