koishi-plugin-chatluna-google-gemini-adapter 1.0.0-beta.24 → 1.0.0-beta.26
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/README.md +2 -2
- package/lib/index.cjs +2 -2
- package/lib/index.mjs +2 -2
- package/package.json +19 -5
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
## chatluna-google-gemini-adapter
|
|
2
2
|
|
|
3
|
-
## [](https://www.npmjs.com/package/koishi-plugin-chatluna-google-gemini) [](https://www.npmjs.com/package//koishi-plugin-chatluna-google-gemini-adapter)
|
|
4
4
|
|
|
5
|
-
> 为
|
|
5
|
+
> 为 ChatLuna 提供 Google-gemini 支持的适配器
|
|
6
6
|
|
|
7
7
|
[Google-gemini 适配器文档](https://chatluna.chat/guide/configure-model-platform/google-gemini.html)
|
package/lib/index.cjs
CHANGED
|
@@ -620,7 +620,7 @@ function apply(ctx, config) {
|
|
|
620
620
|
const plugin = new import_chat.ChatLunaPlugin(ctx, config, "gemini");
|
|
621
621
|
logger = (0, import_logger.createLogger)(ctx, "chatluna-gemini-adapter");
|
|
622
622
|
ctx.on("ready", async () => {
|
|
623
|
-
|
|
623
|
+
plugin.registerToService();
|
|
624
624
|
await plugin.parseConfig((config2) => {
|
|
625
625
|
return config2.apiKeys.map(([apiKey, apiEndpoint]) => {
|
|
626
626
|
return {
|
|
@@ -634,7 +634,7 @@ function apply(ctx, config) {
|
|
|
634
634
|
};
|
|
635
635
|
});
|
|
636
636
|
});
|
|
637
|
-
|
|
637
|
+
plugin.registerClient(
|
|
638
638
|
(_, clientConfig) => new GeminiClient(ctx, config, clientConfig, plugin)
|
|
639
639
|
);
|
|
640
640
|
await plugin.initClients();
|
package/lib/index.mjs
CHANGED
|
@@ -614,7 +614,7 @@ function apply(ctx, config) {
|
|
|
614
614
|
const plugin = new ChatLunaPlugin(ctx, config, "gemini");
|
|
615
615
|
logger = createLogger(ctx, "chatluna-gemini-adapter");
|
|
616
616
|
ctx.on("ready", async () => {
|
|
617
|
-
|
|
617
|
+
plugin.registerToService();
|
|
618
618
|
await plugin.parseConfig((config2) => {
|
|
619
619
|
return config2.apiKeys.map(([apiKey, apiEndpoint]) => {
|
|
620
620
|
return {
|
|
@@ -628,7 +628,7 @@ function apply(ctx, config) {
|
|
|
628
628
|
};
|
|
629
629
|
});
|
|
630
630
|
});
|
|
631
|
-
|
|
631
|
+
plugin.registerClient(
|
|
632
632
|
(_, clientConfig) => new GeminiClient(ctx, config, clientConfig, plugin)
|
|
633
633
|
);
|
|
634
634
|
await plugin.initClients();
|
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.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.26",
|
|
5
5
|
"main": "lib/index.cjs",
|
|
6
6
|
"module": "lib/index.mjs",
|
|
7
7
|
"typings": "lib/index.d.ts",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
],
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
|
+
"types": "./lib/index.d.ts",
|
|
14
15
|
"import": "./lib/index.mjs",
|
|
15
|
-
"require": "./lib/index.cjs"
|
|
16
|
-
"types": "./lib/index.d.ts"
|
|
16
|
+
"require": "./lib/index.cjs"
|
|
17
17
|
},
|
|
18
18
|
"./package.json": "./package.json"
|
|
19
19
|
},
|
|
@@ -32,6 +32,20 @@
|
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "atsc -b"
|
|
34
34
|
},
|
|
35
|
+
"resolutions": {
|
|
36
|
+
"@langchain/core": "0.3.11",
|
|
37
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.15"
|
|
38
|
+
},
|
|
39
|
+
"overrides": {
|
|
40
|
+
"@langchain/core": "0.3.11",
|
|
41
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.15"
|
|
42
|
+
},
|
|
43
|
+
"pnpm": {
|
|
44
|
+
"overrides": {
|
|
45
|
+
"@langchain/core": "0.3.11",
|
|
46
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.15"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
35
49
|
"engines": {
|
|
36
50
|
"node": ">=18.0.0"
|
|
37
51
|
},
|
|
@@ -48,7 +62,7 @@
|
|
|
48
62
|
"adapter"
|
|
49
63
|
],
|
|
50
64
|
"dependencies": {
|
|
51
|
-
"@langchain/core": "^0.3.
|
|
65
|
+
"@langchain/core": "^0.3.11",
|
|
52
66
|
"@streamparser/json": "^0.0.21",
|
|
53
67
|
"zod": "^3.24.0-canary.20240701T200529",
|
|
54
68
|
"zod-to-json-schema": "^3.23.3"
|
|
@@ -59,7 +73,7 @@
|
|
|
59
73
|
},
|
|
60
74
|
"peerDependencies": {
|
|
61
75
|
"koishi": "^4.18.0",
|
|
62
|
-
"koishi-plugin-chatluna": "^1.0.0-beta.
|
|
76
|
+
"koishi-plugin-chatluna": "^1.0.0-beta.103"
|
|
63
77
|
},
|
|
64
78
|
"koishi": {
|
|
65
79
|
"description": {
|