mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-23 18:10:26 +08:00
refactor(ThinkChunkMiddleware): remove reasoning check for improved logic clarity (#8505)
- Removed the reasoning check from the ThinkChunkMiddleware to streamline the processing logic. - This change enhances the middleware's efficiency by focusing on handling streams directly without the reasoning condition.
This commit is contained in:
parent
baad783d64
commit
f87975f49f
@ -34,12 +34,6 @@ export const ThinkChunkMiddleware: CompletionsMiddleware =
|
||||
if (result.stream) {
|
||||
const resultFromUpstream = result.stream as ReadableStream<GenericChunk>
|
||||
|
||||
// 检查是否启用reasoning
|
||||
const enableReasoning = params.enableReasoning || false
|
||||
if (!enableReasoning) {
|
||||
return result
|
||||
}
|
||||
|
||||
// 检查是否有流需要处理
|
||||
if (resultFromUpstream && resultFromUpstream instanceof ReadableStream) {
|
||||
// thinking 处理状态
|
||||
|
||||
Loading…
Reference in New Issue
Block a user