ak-gemini 2.0.5 → 2.0.6
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/base.js +1 -1
- package/index.cjs +1 -1
- package/package.json +1 -1
package/base.js
CHANGED
|
@@ -193,7 +193,7 @@ class BaseGemini {
|
|
|
193
193
|
this.chatSession = this.genAIClient.chats.create(chatOptions);
|
|
194
194
|
|
|
195
195
|
try {
|
|
196
|
-
await this.genAIClient.models.list();
|
|
196
|
+
await this._withRetry(() => this.genAIClient.models.list());
|
|
197
197
|
log.debug(`${this.constructor.name}: API connection successful.`);
|
|
198
198
|
} catch (e) {
|
|
199
199
|
throw new Error(`${this.constructor.name} initialization failed: ${e.message}`);
|
package/index.cjs
CHANGED
|
@@ -426,7 +426,7 @@ var BaseGemini = class {
|
|
|
426
426
|
const chatOptions = this._getChatCreateOptions();
|
|
427
427
|
this.chatSession = this.genAIClient.chats.create(chatOptions);
|
|
428
428
|
try {
|
|
429
|
-
await this.genAIClient.models.list();
|
|
429
|
+
await this._withRetry(() => this.genAIClient.models.list());
|
|
430
430
|
logger_default.debug(`${this.constructor.name}: API connection successful.`);
|
|
431
431
|
} catch (e) {
|
|
432
432
|
throw new Error(`${this.constructor.name} initialization failed: ${e.message}`);
|