koishi-plugin-chatluna-google-gemini-adapter 1.0.0-beta.13 → 1.0.0-beta.15

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 CHANGED
@@ -1,7 +1,7 @@
1
- ## chatluna-google-gemini-adapter
2
-
3
- ## [![npm](https://img.shields.io/npm/v/koishi-plugin-chatluna-google-gemini-adapter/next)](https://www.npmjs.com/package/koishi-plugin-chatluna-google-gemini) [![npm](https://img.shields.io/npm/dm/koishi-plugin-chatluna-google-gemini-adapter)](https://www.npmjs.com/package//koishi-plugin-chatluna-google-gemini-adapter)
4
-
5
- > 为 ChatHub 提供 Google-gemini 支持的适配器
6
-
7
- [Google-gemini 适配器文档](https://chatluna.dingyi222666.top/guide/configure-model-platform/google-gemini.html)
1
+ ## chatluna-google-gemini-adapter
2
+
3
+ ## [![npm](https://img.shields.io/npm/v/koishi-plugin-chatluna-google-gemini-adapter/next)](https://www.npmjs.com/package/koishi-plugin-chatluna-google-gemini) [![npm](https://img.shields.io/npm/dm/koishi-plugin-chatluna-google-gemini-adapter)](https://www.npmjs.com/package//koishi-plugin-chatluna-google-gemini-adapter)
4
+
5
+ > 为 ChatHub 提供 Google-gemini 支持的适配器
6
+
7
+ [Google-gemini 适配器文档](https://chatluna.dingyi222666.top/guide/configure-model-platform/google-gemini.html)
package/lib/index.cjs ADDED
@@ -0,0 +1,632 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ var __export = (target, all) => {
7
+ for (var name2 in all)
8
+ __defProp(target, name2, { get: all[name2], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Config: () => Config,
24
+ apply: () => apply,
25
+ inject: () => inject,
26
+ logger: () => logger,
27
+ name: () => name
28
+ });
29
+ module.exports = __toCommonJS(src_exports);
30
+ var import_chat = require("koishi-plugin-chatluna/services/chat");
31
+ var import_koishi = require("koishi");
32
+
33
+ // src/client.ts
34
+ var import_client = require("koishi-plugin-chatluna/llm-core/platform/client");
35
+ var import_model = require("koishi-plugin-chatluna/llm-core/platform/model");
36
+ var import_types = require("koishi-plugin-chatluna/llm-core/platform/types");
37
+ var import_error2 = require("koishi-plugin-chatluna/utils/error");
38
+
39
+ // src/requester.ts
40
+ var import_messages2 = require("@langchain/core/messages");
41
+ var import_outputs = require("@langchain/core/outputs");
42
+ var import_json = require("@streamparser/json");
43
+ var import_api = require("koishi-plugin-chatluna/llm-core/platform/api");
44
+ var import_error = require("koishi-plugin-chatluna/utils/error");
45
+ var import_request = require("koishi-plugin-chatluna/utils/request");
46
+ var import_sse = require("koishi-plugin-chatluna/utils/sse");
47
+ var import_stream = require("koishi-plugin-chatluna/utils/stream");
48
+
49
+ // src/utils.ts
50
+ var import_messages = require("@langchain/core/messages");
51
+ var import_zod_to_json_schema = require("zod-to-json-schema");
52
+ async function langchainMessageToGeminiMessage(messages, model) {
53
+ const mappedMessage = await Promise.all(
54
+ messages.map(async (rawMessage) => {
55
+ const role = messageTypeToGeminiRole(rawMessage._getType());
56
+ if (role === "function" || rawMessage.additional_kwargs?.function_call != null) {
57
+ return {
58
+ role: "function",
59
+ parts: [
60
+ {
61
+ functionResponse: rawMessage.additional_kwargs?.function_call != null ? void 0 : {
62
+ name: rawMessage.name,
63
+ response: {
64
+ name: rawMessage.name,
65
+ content: (() => {
66
+ try {
67
+ const result3 = JSON.parse(
68
+ rawMessage.content
69
+ );
70
+ if (typeof result3 === "string") {
71
+ return {
72
+ response: result3
73
+ };
74
+ } else {
75
+ return result3;
76
+ }
77
+ } catch (e) {
78
+ return {
79
+ response: rawMessage.content
80
+ };
81
+ }
82
+ })()
83
+ }
84
+ },
85
+ functionCall: rawMessage.additional_kwargs?.function_call != null ? {
86
+ name: rawMessage.additional_kwargs.function_call.name,
87
+ args: (() => {
88
+ try {
89
+ const result3 = JSON.parse(
90
+ rawMessage.additional_kwargs.function_call.arguments
91
+ );
92
+ if (typeof result3 === "string") {
93
+ return {
94
+ input: result3
95
+ };
96
+ } else {
97
+ return result3;
98
+ }
99
+ } catch (e) {
100
+ return {
101
+ input: rawMessage.additional_kwargs.function_call.arguments
102
+ };
103
+ }
104
+ })()
105
+ } : void 0
106
+ }
107
+ ]
108
+ };
109
+ }
110
+ const images = rawMessage.additional_kwargs.images;
111
+ const result2 = {
112
+ role,
113
+ parts: [
114
+ {
115
+ text: rawMessage.content
116
+ }
117
+ ]
118
+ };
119
+ if ((model.includes("vision") || model.includes("gemini-1.5")) && images != null) {
120
+ for (const image of images) {
121
+ result2.parts.push({
122
+ inline_data: {
123
+ // base64 image match type
124
+ data: image.replace(/^data:image\/\w+;base64,/, ""),
125
+ mime_type: "image/jpeg"
126
+ }
127
+ });
128
+ }
129
+ }
130
+ return result2;
131
+ })
132
+ );
133
+ const result = [];
134
+ for (let i = 0; i < mappedMessage.length; i++) {
135
+ const message = mappedMessage[i];
136
+ if (message.role !== "system") {
137
+ result.push(message);
138
+ continue;
139
+ }
140
+ result.push({
141
+ role: "user",
142
+ parts: message.parts
143
+ });
144
+ if (mappedMessage?.[i + 1]?.role === "model") {
145
+ continue;
146
+ }
147
+ if (mappedMessage?.[i + 1]?.role === "user") {
148
+ result.push({
149
+ role: "model",
150
+ parts: [{ text: "Okay, what do I need to do?" }]
151
+ });
152
+ }
153
+ }
154
+ if (result[result.length - 1].role === "model") {
155
+ result.push({
156
+ role: "user",
157
+ parts: [
158
+ {
159
+ text: "Continue what I said to you last message. Follow these instructions."
160
+ }
161
+ ]
162
+ });
163
+ }
164
+ if (model.includes("vision")) {
165
+ const textBuffer = [];
166
+ const last = result.pop();
167
+ for (let i = 0; i < result.length; i++) {
168
+ const message = result[i];
169
+ const text = message.parts[0].text;
170
+ textBuffer.push(`${message.role}: ${text}`);
171
+ }
172
+ const lastParts = last.parts;
173
+ let lastImagesParts = lastParts.filter(
174
+ (part) => part.inline_data?.mime_type === "image/jpeg"
175
+ );
176
+ if (lastImagesParts.length < 1) {
177
+ for (let i = result.length - 1; i >= 0; i--) {
178
+ const message = result[i];
179
+ const images = message.parts.filter(
180
+ (part) => part.inline_data?.mime_type === "image/jpeg"
181
+ );
182
+ if (images.length > 0) {
183
+ lastImagesParts = images;
184
+ break;
185
+ }
186
+ }
187
+ }
188
+ ;
189
+ lastParts.filter(
190
+ (part) => part.text !== void 0 && part.text !== null
191
+ ).forEach((part) => {
192
+ textBuffer.push(`${last.role}: ${part.text}`);
193
+ });
194
+ return [
195
+ {
196
+ role: "user",
197
+ parts: [
198
+ {
199
+ text: textBuffer.join("\n")
200
+ },
201
+ ...lastImagesParts
202
+ ]
203
+ }
204
+ ];
205
+ }
206
+ return result;
207
+ }
208
+ __name(langchainMessageToGeminiMessage, "langchainMessageToGeminiMessage");
209
+ function partAsType(part) {
210
+ return part;
211
+ }
212
+ __name(partAsType, "partAsType");
213
+ function formatToolsToGeminiAITools(tools) {
214
+ if (tools.length < 1) {
215
+ return void 0;
216
+ }
217
+ return tools.map(formatToolToGeminiAITool);
218
+ }
219
+ __name(formatToolsToGeminiAITools, "formatToolsToGeminiAITools");
220
+ function formatToolToGeminiAITool(tool) {
221
+ const parameters = (0, import_zod_to_json_schema.zodToJsonSchema)(tool.schema);
222
+ delete parameters["$schema"];
223
+ delete parameters["additionalProperties"];
224
+ return {
225
+ name: tool.name,
226
+ description: tool.description,
227
+ // any?
228
+ parameters
229
+ };
230
+ }
231
+ __name(formatToolToGeminiAITool, "formatToolToGeminiAITool");
232
+ function messageTypeToGeminiRole(type) {
233
+ switch (type) {
234
+ case "system":
235
+ return "system";
236
+ case "ai":
237
+ return "model";
238
+ case "human":
239
+ return "user";
240
+ case "function":
241
+ return "function";
242
+ default:
243
+ throw new Error(`Unknown message type: ${type}`);
244
+ }
245
+ }
246
+ __name(messageTypeToGeminiRole, "messageTypeToGeminiRole");
247
+
248
+ // src/requester.ts
249
+ var GeminiRequester = class extends import_api.ModelRequester {
250
+ constructor(_config) {
251
+ super();
252
+ this._config = _config;
253
+ }
254
+ static {
255
+ __name(this, "GeminiRequester");
256
+ }
257
+ async *completionStream(params) {
258
+ try {
259
+ const response = await this._post(
260
+ `models/${params.model}:streamGenerateContent`,
261
+ {
262
+ contents: await langchainMessageToGeminiMessage(
263
+ params.input,
264
+ params.model
265
+ ),
266
+ safetySettings: [
267
+ {
268
+ category: "HARM_CATEGORY_HARASSMENT",
269
+ threshold: "BLOCK_NONE"
270
+ },
271
+ {
272
+ category: "HARM_CATEGORY_HATE_SPEECH",
273
+ threshold: "BLOCK_NONE"
274
+ },
275
+ {
276
+ category: "HARM_CATEGORY_SEXUALLY_EXPLICIT",
277
+ threshold: "BLOCK_NONE"
278
+ },
279
+ {
280
+ category: "HARM_CATEGORY_DANGEROUS_CONTENT",
281
+ threshold: "BLOCK_NONE"
282
+ }
283
+ ],
284
+ generationConfig: {
285
+ stopSequences: params.stop,
286
+ temperature: params.temperature,
287
+ maxOutputTokens: params.model.includes("vision") ? void 0 : params.maxTokens,
288
+ topP: params.topP
289
+ },
290
+ tools: !params.model.includes("vision") && params.tools != null ? {
291
+ functionDeclarations: formatToolsToGeminiAITools(params.tools)
292
+ } : void 0
293
+ },
294
+ {
295
+ signal: params.signal
296
+ }
297
+ );
298
+ let errorCount = 0;
299
+ const stream = new TransformStream();
300
+ const iterable = (0, import_stream.readableStreamToAsyncIterable)(
301
+ stream.readable
302
+ );
303
+ const jsonParser = new import_json.JSONParser();
304
+ const writable = stream.writable.getWriter();
305
+ jsonParser.onEnd = async () => {
306
+ await writable.close();
307
+ };
308
+ jsonParser.onValue = async ({ value }) => {
309
+ const transformValue = value;
310
+ if (transformValue.candidates && transformValue.candidates[0]) {
311
+ const parts = transformValue.candidates[0]?.content?.parts;
312
+ if (parts == null || parts.length < 1) {
313
+ throw new Error(JSON.stringify(value));
314
+ }
315
+ for (const part of parts) {
316
+ await writable.write(part);
317
+ }
318
+ }
319
+ };
320
+ await (0, import_sse.sse)(
321
+ response,
322
+ async (rawData) => {
323
+ jsonParser.write(rawData);
324
+ return true;
325
+ },
326
+ 0
327
+ );
328
+ let content = "";
329
+ let isOldVisionModel = params.model.includes("vision");
330
+ const functionCall = {
331
+ name: "",
332
+ args: "",
333
+ arguments: ""
334
+ };
335
+ for await (const chunk of iterable) {
336
+ const messagePart = partAsType(chunk);
337
+ const chatFunctionCallingPart = partAsType(chunk);
338
+ if (messagePart.text) {
339
+ if (params.tools != null) {
340
+ content = messagePart.text;
341
+ } else {
342
+ content += messagePart.text;
343
+ }
344
+ if (isOldVisionModel && /\s*model:\s*/.test(content)) {
345
+ isOldVisionModel = false;
346
+ content = messagePart.text.replace(/\s*model:\s*/, "");
347
+ }
348
+ }
349
+ const deltaFunctionCall = chatFunctionCallingPart.functionCall;
350
+ if (deltaFunctionCall) {
351
+ let args = deltaFunctionCall.args?.input ?? deltaFunctionCall.args;
352
+ try {
353
+ let parsedArgs = JSON.parse(args);
354
+ if (typeof parsedArgs !== "string") {
355
+ args = parsedArgs;
356
+ }
357
+ parsedArgs = JSON.parse(args);
358
+ if (typeof parsedArgs !== "string") {
359
+ args = parsedArgs;
360
+ }
361
+ } catch (e) {
362
+ }
363
+ functionCall.args = JSON.stringify(args);
364
+ functionCall.name = deltaFunctionCall.name;
365
+ functionCall.arguments = deltaFunctionCall.args;
366
+ }
367
+ try {
368
+ const messageChunk = new import_messages2.AIMessageChunk(content);
369
+ messageChunk.additional_kwargs = {
370
+ function_call: functionCall.name.length > 0 ? {
371
+ name: functionCall.name,
372
+ arguments: functionCall.args,
373
+ args: functionCall.arguments
374
+ } : void 0
375
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
376
+ };
377
+ messageChunk.content = content;
378
+ const generationChunk = new import_outputs.ChatGenerationChunk({
379
+ message: messageChunk,
380
+ text: messageChunk.content
381
+ });
382
+ yield generationChunk;
383
+ content = messageChunk.content;
384
+ } catch (e) {
385
+ if (errorCount > 5) {
386
+ logger.error("error with chunk", chunk);
387
+ throw new import_error.ChatLunaError(
388
+ import_error.ChatLunaErrorCode.API_REQUEST_FAILED,
389
+ e
390
+ );
391
+ } else {
392
+ errorCount++;
393
+ continue;
394
+ }
395
+ }
396
+ }
397
+ } catch (e) {
398
+ if (e instanceof import_error.ChatLunaError) {
399
+ throw e;
400
+ } else {
401
+ throw new import_error.ChatLunaError(import_error.ChatLunaErrorCode.API_REQUEST_FAILED, e);
402
+ }
403
+ }
404
+ }
405
+ async embeddings(params) {
406
+ let data;
407
+ try {
408
+ const response = await this._post(
409
+ `models/${params.model}:embedContent`,
410
+ {
411
+ model: `models/${params.model}`,
412
+ content: {
413
+ parts: [
414
+ {
415
+ text: params.input
416
+ }
417
+ ]
418
+ }
419
+ }
420
+ );
421
+ data = await response.text();
422
+ data = JSON.parse(data);
423
+ if (data.embedding && data.embedding.values?.length > 0) {
424
+ return data.embedding.values;
425
+ }
426
+ throw new Error(
427
+ "error when calling gemini embeddings, Result: " + JSON.stringify(data)
428
+ );
429
+ } catch (e) {
430
+ const error = new Error(
431
+ "error when calling gemini embeddings, Result: " + JSON.stringify(data)
432
+ );
433
+ error.stack = e.stack;
434
+ error.cause = e.cause;
435
+ logger.debug(e);
436
+ throw new import_error.ChatLunaError(import_error.ChatLunaErrorCode.API_REQUEST_FAILED, error);
437
+ }
438
+ }
439
+ async getModels() {
440
+ let data;
441
+ try {
442
+ const response = await this._get("models");
443
+ data = await response.text();
444
+ data = JSON.parse(data);
445
+ if (!data.models || !data.models.length) {
446
+ throw new Error(
447
+ "error when listing gemini models, Result:" + JSON.stringify(data)
448
+ );
449
+ }
450
+ return data.models.map((model) => model.name).filter(
451
+ (model) => model.includes("gemini") || model.includes("embedding")
452
+ );
453
+ } catch (e) {
454
+ const error = new Error(
455
+ "error when listing gemini models, Result: " + JSON.stringify(data)
456
+ );
457
+ error.stack = e.stack;
458
+ error.cause = e.cause;
459
+ throw error;
460
+ }
461
+ }
462
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
463
+ _post(url, data, params = {}) {
464
+ const requestUrl = this._concatUrl(url);
465
+ for (const key in data) {
466
+ if (data[key] === void 0) {
467
+ delete data[key];
468
+ }
469
+ }
470
+ const body = JSON.stringify(data);
471
+ return (0, import_request.chatLunaFetch)(requestUrl, {
472
+ body,
473
+ headers: this._buildHeaders(),
474
+ method: "POST",
475
+ ...params
476
+ });
477
+ }
478
+ _get(url) {
479
+ const requestUrl = this._concatUrl(url);
480
+ return (0, import_request.chatLunaFetch)(requestUrl, {
481
+ method: "GET",
482
+ headers: this._buildHeaders()
483
+ });
484
+ }
485
+ _concatUrl(url) {
486
+ const apiEndPoint = this._config.apiEndpoint;
487
+ if (apiEndPoint.endsWith("/")) {
488
+ return apiEndPoint + url + `?key=${this._config.apiKey}`;
489
+ }
490
+ return apiEndPoint + "/" + url + `?key=${this._config.apiKey}`;
491
+ }
492
+ _buildHeaders() {
493
+ return {
494
+ /* Authorization: `Bearer ${this._config.apiKey}`, */
495
+ "Content-Type": "application/json"
496
+ };
497
+ }
498
+ async init() {
499
+ }
500
+ async dispose() {
501
+ }
502
+ };
503
+
504
+ // src/client.ts
505
+ var GeminiClient = class extends import_client.PlatformModelAndEmbeddingsClient {
506
+ constructor(ctx, _config, clientConfig) {
507
+ super(ctx, clientConfig);
508
+ this._config = _config;
509
+ this._requester = new GeminiRequester(clientConfig);
510
+ }
511
+ static {
512
+ __name(this, "GeminiClient");
513
+ }
514
+ platform = "gemini";
515
+ _requester;
516
+ _models;
517
+ async init() {
518
+ await this.getModels();
519
+ }
520
+ async refreshModels() {
521
+ try {
522
+ const rawModels = await this._requester.getModels();
523
+ if (!rawModels.length) {
524
+ throw new import_error2.ChatLunaError(
525
+ import_error2.ChatLunaErrorCode.MODEL_INIT_ERROR,
526
+ new Error("No model found")
527
+ );
528
+ }
529
+ return rawModels.map((model) => model.replace("models/", "")).map((model) => {
530
+ return {
531
+ name: model,
532
+ maxTokens: model.includes("vision") ? 12288 : 30720,
533
+ type: model.includes("embedding") ? import_types.ModelType.embeddings : import_types.ModelType.llm,
534
+ functionCall: !model.includes("vision"),
535
+ supportMode: ["all"]
536
+ };
537
+ });
538
+ } catch (e) {
539
+ throw new import_error2.ChatLunaError(import_error2.ChatLunaErrorCode.MODEL_INIT_ERROR, e);
540
+ }
541
+ }
542
+ async getModels() {
543
+ if (this._models) {
544
+ return Object.values(this._models);
545
+ }
546
+ const models = await this.refreshModels();
547
+ this._models = {};
548
+ for (const model of models) {
549
+ this._models[model.name] = model;
550
+ }
551
+ }
552
+ _createModel(model) {
553
+ const info = this._models[model];
554
+ if (info == null) {
555
+ throw new import_error2.ChatLunaError(import_error2.ChatLunaErrorCode.MODEL_NOT_FOUND);
556
+ }
557
+ if (info.type === import_types.ModelType.llm) {
558
+ return new import_model.ChatLunaChatModel({
559
+ modelInfo: info,
560
+ requester: this._requester,
561
+ model,
562
+ maxTokens: this._config.maxTokens,
563
+ timeout: this._config.timeout,
564
+ temperature: this._config.temperature,
565
+ maxRetries: this._config.maxRetries,
566
+ llmType: "gemini"
567
+ });
568
+ }
569
+ return new import_model.ChatLunaEmbeddings({
570
+ client: this._requester,
571
+ model,
572
+ maxRetries: this._config.maxRetries
573
+ });
574
+ }
575
+ };
576
+
577
+ // src/index.ts
578
+ var import_logger = require("koishi-plugin-chatluna/utils/logger");
579
+ var logger;
580
+ function apply(ctx, config) {
581
+ const plugin = new import_chat.ChatLunaPlugin(ctx, config, "gemini");
582
+ logger = (0, import_logger.createLogger)(ctx, "chatluna-gemini-adapter");
583
+ ctx.on("ready", async () => {
584
+ await plugin.registerToService();
585
+ await plugin.parseConfig((config2) => {
586
+ return config2.apiKeys.map(([apiKey, apiEndpoint]) => {
587
+ return {
588
+ apiKey,
589
+ apiEndpoint,
590
+ platform: "gemini",
591
+ chatLimit: config2.chatTimeLimit,
592
+ timeout: config2.timeout,
593
+ maxRetries: config2.maxRetries,
594
+ concurrentMaxSize: config2.chatConcurrentMaxSize
595
+ };
596
+ });
597
+ });
598
+ await plugin.registerClient(
599
+ (_, clientConfig) => new GeminiClient(ctx, config, clientConfig)
600
+ );
601
+ await plugin.initClients();
602
+ });
603
+ }
604
+ __name(apply, "apply");
605
+ var Config = import_koishi.Schema.intersect([
606
+ import_chat.ChatLunaPlugin.Config,
607
+ import_koishi.Schema.object({
608
+ apiKeys: import_koishi.Schema.array(
609
+ import_koishi.Schema.tuple([
610
+ import_koishi.Schema.string().role("secret").description("Gemini 的 API Key").required(),
611
+ import_koishi.Schema.string().description("请求 Gemini API 的地址").default("https://generativelanguage.googleapis.com/v1beta")
612
+ ])
613
+ ).description("Gemini 的 API Key 和请求地址列表").default([["", "https://generativelanguage.googleapis.com/v1beta"]])
614
+ }).description("请求设置"),
615
+ import_koishi.Schema.object({
616
+ maxTokens: import_koishi.Schema.number().description(
617
+ "回复的最大 Token 数(16~32800,必须是16的倍数)(注意如果你目前使用的模型的最大 Token 为 8000 及以上的话才建议设置超过 512 token)"
618
+ ).min(16).max(128e3).step(16).default(1024),
619
+ temperature: import_koishi.Schema.percent().description("回复温度,越高越随机").min(0).max(1).step(0.1).default(0.8)
620
+ }).description("模型设置")
621
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
622
+ ]);
623
+ var inject = ["chatluna"];
624
+ var name = "chatluna-google-gemini-adapter";
625
+ // Annotate the CommonJS export names for ESM import in node:
626
+ 0 && (module.exports = {
627
+ Config,
628
+ apply,
629
+ inject,
630
+ logger,
631
+ name
632
+ });