koishi-plugin-chatluna-google-gemini-adapter 1.2.11 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.cjs +1 -1
- package/lib/index.mjs +1 -1
- package/lib/utils.d.ts +1 -4
- package/package.json +1 -1
package/lib/index.cjs
CHANGED
|
@@ -398,7 +398,7 @@ var GeminiRequester = class extends import_api.ModelRequester {
|
|
|
398
398
|
includeThoughts: this._pluginConfig.includeThoughts
|
|
399
399
|
} : void 0
|
|
400
400
|
},
|
|
401
|
-
|
|
401
|
+
system_instruction: systemInstruction != null ? systemInstruction : void 0,
|
|
402
402
|
tools: params.tools != null || this._pluginConfig.googleSearch || this._pluginConfig.codeExecution || this._pluginConfig.urlContext ? formatToolsToGeminiAITools(
|
|
403
403
|
params.tools ?? [],
|
|
404
404
|
this._pluginConfig,
|
package/lib/index.mjs
CHANGED
|
@@ -381,7 +381,7 @@ var GeminiRequester = class extends ModelRequester {
|
|
|
381
381
|
includeThoughts: this._pluginConfig.includeThoughts
|
|
382
382
|
} : void 0
|
|
383
383
|
},
|
|
384
|
-
|
|
384
|
+
system_instruction: systemInstruction != null ? systemInstruction : void 0,
|
|
385
385
|
tools: params.tools != null || this._pluginConfig.googleSearch || this._pluginConfig.codeExecution || this._pluginConfig.urlContext ? formatToolsToGeminiAITools(
|
|
386
386
|
params.tools ?? [],
|
|
387
387
|
this._pluginConfig,
|
package/lib/utils.d.ts
CHANGED
|
@@ -3,10 +3,7 @@ import { StructuredTool } from '@langchain/core/tools';
|
|
|
3
3
|
import { ChatCompletionFunction, ChatCompletionResponseMessage, ChatCompletionResponseMessageRoleEnum, ChatPart } from './types';
|
|
4
4
|
import { Config } from '.';
|
|
5
5
|
export declare function langchainMessageToGeminiMessage(messages: BaseMessage[], model?: string): Promise<ChatCompletionResponseMessage[]>;
|
|
6
|
-
export declare function extractSystemMessages(messages: ChatCompletionResponseMessage[]): [
|
|
7
|
-
ChatCompletionResponseMessage,
|
|
8
|
-
ChatCompletionResponseMessage[]
|
|
9
|
-
];
|
|
6
|
+
export declare function extractSystemMessages(messages: ChatCompletionResponseMessage[]): [ChatCompletionResponseMessage, ChatCompletionResponseMessage[]];
|
|
10
7
|
export declare function partAsType<T extends ChatPart>(part: ChatPart): T;
|
|
11
8
|
export declare function partAsTypeCheck<T extends ChatPart>(part: ChatPart, check: (part: ChatPart & unknown) => boolean): T | undefined;
|
|
12
9
|
export declare function formatToolsToGeminiAITools(tools: StructuredTool[], config: Config, model: string): Record<string, any>;
|
package/package.json
CHANGED