mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-29 23:12:38 +08:00
fix(GeminiAPIClient): update abortSignal option and ensure userLastMessage is pushed to messages (#7387)
This commit is contained in:
parent
3e142f67ad
commit
1915ba5bfb
@ -85,7 +85,7 @@ export class GeminiAPIClient extends BaseApiClient<
|
||||
...rest,
|
||||
config: {
|
||||
...rest.config,
|
||||
abortSignal: options?.abortSignal,
|
||||
abortSignal: options?.signal,
|
||||
httpOptions: {
|
||||
...rest.config?.httpOptions,
|
||||
timeout: options?.timeout
|
||||
@ -479,6 +479,7 @@ export class GeminiAPIClient extends BaseApiClient<
|
||||
for (const message of messages) {
|
||||
history.push(await this.convertMessageToSdkParam(message))
|
||||
}
|
||||
messages.push(userLastMessage)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -102,6 +102,6 @@ export type GeminiSdkToolCall = FunctionCall
|
||||
|
||||
export type GeminiOptions = {
|
||||
streamOutput: boolean
|
||||
abortSignal?: AbortSignal
|
||||
signal?: AbortSignal
|
||||
timeout?: number
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user