fix(ApiService): move return statement for AI completions (#8422)

fix(ApiService): move return statement for AI completions to improve code clarity
This commit is contained in:
SuYao
2025-07-23 22:12:53 +08:00
committed by GitHub
parent 0649b060ce
commit 5f5dfd13c7
+2 -2
View File
@@ -488,13 +488,13 @@ export async function fetchChatCompletion({
streamOutput: assistant.settings?.streamOutput || false
}
return await AI.completionsForTrace(completionsParams, requestOptions)
// Post-conversation memory processing
const globalMemoryEnabled = selectGlobalMemoryEnabled(store.getState())
if (globalMemoryEnabled && assistant.enableMemory) {
await processConversationMemory(messages, assistant)
}
return await AI.completionsForTrace(completionsParams, requestOptions)
}
/**