mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-24 02:20:10 +08:00
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:
parent
0649b060ce
commit
5f5dfd13c7
@ -488,13 +488,13 @@ export async function fetchChatCompletion({
|
|||||||
streamOutput: assistant.settings?.streamOutput || false
|
streamOutput: assistant.settings?.streamOutput || false
|
||||||
}
|
}
|
||||||
|
|
||||||
return await AI.completionsForTrace(completionsParams, requestOptions)
|
|
||||||
|
|
||||||
// Post-conversation memory processing
|
// Post-conversation memory processing
|
||||||
const globalMemoryEnabled = selectGlobalMemoryEnabled(store.getState())
|
const globalMemoryEnabled = selectGlobalMemoryEnabled(store.getState())
|
||||||
if (globalMemoryEnabled && assistant.enableMemory) {
|
if (globalMemoryEnabled && assistant.enableMemory) {
|
||||||
await processConversationMemory(messages, assistant)
|
await processConversationMemory(messages, assistant)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return await AI.completionsForTrace(completionsParams, requestOptions)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user