mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 23:10:20 +08:00
fix: type check
This commit is contained in:
parent
e8dccf51fe
commit
e255a992cc
@ -36,7 +36,6 @@ import type {
|
|||||||
Usage
|
Usage
|
||||||
} from '@anthropic-ai/sdk/resources/messages'
|
} from '@anthropic-ai/sdk/resources/messages'
|
||||||
import { loggerService } from '@logger'
|
import { loggerService } from '@logger'
|
||||||
import { reasoningCache } from '@main/apiServer/services/cache'
|
|
||||||
import type { JSONValue } from 'ai'
|
import type { JSONValue } from 'ai'
|
||||||
import { type FinishReason, type LanguageModelUsage, type TextStreamPart, type ToolSet } from 'ai'
|
import { type FinishReason, type LanguageModelUsage, type TextStreamPart, type ToolSet } from 'ai'
|
||||||
|
|
||||||
@ -77,6 +76,7 @@ export type SSEEventCallback = (event: RawMessageStreamEvent) => void
|
|||||||
*/
|
*/
|
||||||
export interface ReasoningCacheInterface {
|
export interface ReasoningCacheInterface {
|
||||||
set(signature: string, details: JSONValue): void
|
set(signature: string, details: JSONValue): void
|
||||||
|
destroy?(): void
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AiSdkToAnthropicSSEOptions {
|
export interface AiSdkToAnthropicSSEOptions {
|
||||||
@ -555,7 +555,7 @@ export class AiSdkToAnthropicSSE {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.onEvent(messageStopEvent)
|
this.onEvent(messageStopEvent)
|
||||||
reasoningCache.destroy()
|
this.reasoningCache?.destroy?.()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user