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:
@@ -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)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user