koishi-plugin-chatluna-google-gemini-adapter 1.3.0-alpha.21 → 1.3.0-alpha.23
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 +7 -5
- package/lib/index.mjs +7 -5
- package/package.json +92 -92
package/lib/index.cjs
CHANGED
|
@@ -739,11 +739,13 @@ var GeminiRequester = class extends import_api.ModelRequester {
|
|
|
739
739
|
(chunk2) => chunk2["usage"] != null
|
|
740
740
|
)) {
|
|
741
741
|
const generationChunk = new import_outputs.ChatGenerationChunk({
|
|
742
|
-
message: new import_messages.AIMessageChunk(
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
742
|
+
message: new import_messages.AIMessageChunk({
|
|
743
|
+
content: "",
|
|
744
|
+
response_metadata: {
|
|
745
|
+
tokenUsage: parsedChunk.usage
|
|
746
|
+
}
|
|
747
|
+
}),
|
|
748
|
+
text: ""
|
|
747
749
|
});
|
|
748
750
|
yield { type: "generation", generation: generationChunk };
|
|
749
751
|
}
|
package/lib/index.mjs
CHANGED
|
@@ -736,11 +736,13 @@ var GeminiRequester = class extends ModelRequester {
|
|
|
736
736
|
(chunk2) => chunk2["usage"] != null
|
|
737
737
|
)) {
|
|
738
738
|
const generationChunk = new ChatGenerationChunk({
|
|
739
|
-
message: new AIMessageChunk(
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
739
|
+
message: new AIMessageChunk({
|
|
740
|
+
content: "",
|
|
741
|
+
response_metadata: {
|
|
742
|
+
tokenUsage: parsedChunk.usage
|
|
743
|
+
}
|
|
744
|
+
}),
|
|
745
|
+
text: ""
|
|
744
746
|
});
|
|
745
747
|
yield { type: "generation", generation: generationChunk };
|
|
746
748
|
}
|
package/package.json
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
"name": "koishi-plugin-chatluna-google-gemini-adapter",
|
|
3
|
+
"description": "google-gemini adapter for chatluna",
|
|
4
|
+
"version": "1.3.0-alpha.23",
|
|
5
|
+
"main": "lib/index.cjs",
|
|
6
|
+
"module": "lib/index.mjs",
|
|
7
|
+
"typings": "lib/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib",
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./lib/index.d.ts",
|
|
15
|
+
"import": "./lib/index.mjs",
|
|
16
|
+
"require": "./lib/index.cjs"
|
|
17
|
+
},
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"type": "module",
|
|
21
|
+
"author": "dingyi222666 <dingyi222666@foxmail.com>",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/ChatLunaLab/chatluna.git",
|
|
25
|
+
"directory": "packages/adapter-gemini"
|
|
26
|
+
},
|
|
27
|
+
"license": "AGPL-3.0",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/ChatLunaLab/chatluna/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/ChatLunaLab/chatluna/tree/v1-dev/packages/adapter-gemini#readme",
|
|
32
|
+
"scripts": {
|
|
33
|
+
"build": "atsc -b"
|
|
34
|
+
},
|
|
35
|
+
"resolutions": {
|
|
36
|
+
"@langchain/core": "0.3.62",
|
|
37
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.21"
|
|
17
38
|
},
|
|
18
|
-
"./package.json": "./package.json"
|
|
19
|
-
},
|
|
20
|
-
"type": "module",
|
|
21
|
-
"author": "dingyi222666 <dingyi222666@foxmail.com>",
|
|
22
|
-
"repository": {
|
|
23
|
-
"type": "git",
|
|
24
|
-
"url": "https://github.com/ChatLunaLab/chatluna.git",
|
|
25
|
-
"directory": "packages/adapter-gemini"
|
|
26
|
-
},
|
|
27
|
-
"license": "AGPL-3.0",
|
|
28
|
-
"bugs": {
|
|
29
|
-
"url": "https://github.com/ChatLunaLab/chatluna/issues"
|
|
30
|
-
},
|
|
31
|
-
"homepage": "https://github.com/ChatLunaLab/chatluna/tree/v1-dev/packages/adapter-gemini#readme",
|
|
32
|
-
"scripts": {
|
|
33
|
-
"build": "atsc -b"
|
|
34
|
-
},
|
|
35
|
-
"resolutions": {
|
|
36
|
-
"@langchain/core": "0.3.62",
|
|
37
|
-
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.21"
|
|
38
|
-
},
|
|
39
|
-
"overrides": {
|
|
40
|
-
"@langchain/core": "0.3.62",
|
|
41
|
-
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.21"
|
|
42
|
-
},
|
|
43
|
-
"pnpm": {
|
|
44
39
|
"overrides": {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
40
|
+
"@langchain/core": "0.3.62",
|
|
41
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.21"
|
|
42
|
+
},
|
|
43
|
+
"pnpm": {
|
|
44
|
+
"overrides": {
|
|
45
|
+
"@langchain/core": "0.3.62",
|
|
46
|
+
"js-tiktoken": "npm:@dingyi222666/js-tiktoken@^1.0.21"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"engines": {
|
|
50
|
+
"node": ">=18.0.0"
|
|
51
|
+
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"chatbot",
|
|
54
|
+
"koishi",
|
|
55
|
+
"plugin",
|
|
56
|
+
"service",
|
|
57
|
+
"chatgpt",
|
|
58
|
+
"gpt",
|
|
59
|
+
"google",
|
|
60
|
+
"gemini",
|
|
61
|
+
"chatluna",
|
|
62
|
+
"adapter"
|
|
63
|
+
],
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@anatine/zod-openapi": "^2.2.8",
|
|
66
|
+
"@chatluna/v1-shared-adapter": "^1.0.16",
|
|
67
|
+
"@langchain/core": "0.3.62",
|
|
68
|
+
"openapi3-ts": "^4.5.0",
|
|
69
|
+
"zod": "3.25.76",
|
|
70
|
+
"zod-to-json-schema": "^3.24.6"
|
|
71
|
+
},
|
|
72
|
+
"devDependencies": {
|
|
73
|
+
"atsc": "^2.1.0",
|
|
74
|
+
"koishi": "^4.18.9"
|
|
75
|
+
},
|
|
76
|
+
"peerDependencies": {
|
|
77
|
+
"koishi": "^4.18.9",
|
|
78
|
+
"koishi-plugin-chatluna": "^1.3.0-alpha.77",
|
|
79
|
+
"koishi-plugin-chatluna-storage-service": "^0.0.11"
|
|
80
|
+
},
|
|
81
|
+
"peerDependenciesMeta": {
|
|
82
|
+
"koishi-plugin-chatluna-storage-service": {
|
|
83
|
+
"optional": true
|
|
84
|
+
}
|
|
90
85
|
},
|
|
91
|
-
"
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
86
|
+
"koishi": {
|
|
87
|
+
"description": {
|
|
88
|
+
"zh": "ChatLuna 的 Google Gemini 适配器",
|
|
89
|
+
"en": "Google Gemini adapter for ChatLuna"
|
|
90
|
+
},
|
|
91
|
+
"service": {
|
|
92
|
+
"required": [
|
|
93
|
+
"chatluna"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
95
96
|
}
|
|
96
|
-
|
|
97
|
-
}
|
|
97
|
+
}
|