koishi-plugin-chatluna-google-gemini-adapter 1.1.0-beta.3 → 1.1.0
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 +3 -1
- package/lib/index.mjs +3 -1
- package/lib/utils.d.ts +1 -1
- package/package.json +2 -2
package/lib/index.cjs
CHANGED
|
@@ -254,7 +254,9 @@ function formatToolsToGeminiAITools(tools, config, model) {
|
|
|
254
254
|
});
|
|
255
255
|
} else if (functions.length > 0 && googleSearch) {
|
|
256
256
|
logger.warn("Google search is enabled, tool calling will be disable.");
|
|
257
|
-
} else if (unsupportedModels.some(
|
|
257
|
+
} else if (unsupportedModels.some(
|
|
258
|
+
(unsupportedModel) => model.includes(unsupportedModel)
|
|
259
|
+
) && googleSearch) {
|
|
258
260
|
logger.warn(
|
|
259
261
|
`The model ${model} does not support google search. google search will be disable.`
|
|
260
262
|
);
|
package/lib/index.mjs
CHANGED
|
@@ -248,7 +248,9 @@ function formatToolsToGeminiAITools(tools, config, model) {
|
|
|
248
248
|
});
|
|
249
249
|
} else if (functions.length > 0 && googleSearch) {
|
|
250
250
|
logger.warn("Google search is enabled, tool calling will be disable.");
|
|
251
|
-
} else if (unsupportedModels.some(
|
|
251
|
+
} else if (unsupportedModels.some(
|
|
252
|
+
(unsupportedModel) => model.includes(unsupportedModel)
|
|
253
|
+
) && googleSearch) {
|
|
252
254
|
logger.warn(
|
|
253
255
|
`The model ${model} does not support google search. google search will be disable.`
|
|
254
256
|
);
|
package/lib/utils.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare function partAsType<T extends ChatPart>(part: ChatPart): T;
|
|
|
7
7
|
export declare function formatToolsToGeminiAITools(tools: StructuredTool[], config: Config, model: string): Record<string, any>;
|
|
8
8
|
export declare function formatToolToGeminiAITool(tool: StructuredTool): ChatCompletionFunction;
|
|
9
9
|
export declare function messageTypeToGeminiRole(type: MessageType): ChatCompletionResponseMessageRoleEnum;
|
|
10
|
-
export declare function convertDeltaToMessageChunk(delta: Record<string, any>, defaultRole?: ChatCompletionResponseMessageRoleEnum):
|
|
10
|
+
export declare function convertDeltaToMessageChunk(delta: Record<string, any>, defaultRole?: ChatCompletionResponseMessageRoleEnum): HumanMessageChunk | AIMessageChunk | SystemMessageChunk | ChatMessageChunk;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "koishi-plugin-chatluna-google-gemini-adapter",
|
|
3
3
|
"description": "google-gemini adapter for chatluna",
|
|
4
|
-
"version": "1.1.0
|
|
4
|
+
"version": "1.1.0",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
7
7
|
"typings": "lib/index.d.ts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"koishi": "^4.18.4",
|
|
75
|
-
"koishi-plugin-chatluna": "^1.1.0
|
|
75
|
+
"koishi-plugin-chatluna": "^1.1.0"
|
|
76
76
|
},
|
|
77
77
|
"koishi": {
|
|
78
78
|
"description": {
|