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.
Files changed (3) hide show
  1. package/base.js +1 -1
  2. package/index.cjs +1 -1
  3. 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}`);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ak-gemini",
3
3
  "author": "ak@mixpanel.com",
4
4
  "description": "AK's Generative AI Helper for doing... everything",
5
- "version": "2.0.5",
5
+ "version": "2.0.6",
6
6
  "main": "index.js",
7
7
  "files": [
8
8
  "index.js",