@google/genai 1.0.0 → 1.0.1

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/dist/index.mjs CHANGED
@@ -4170,7 +4170,10 @@ class Chat {
4170
4170
  this.recordHistory(inputContent, modelOutput, automaticFunctionCallingHistory);
4171
4171
  return;
4172
4172
  })();
4173
- await this.sendPromise;
4173
+ await this.sendPromise.catch(() => {
4174
+ // Resets sendPromise to avoid subsequent calls failing
4175
+ this.sendPromise = Promise.resolve();
4176
+ });
4174
4177
  return responsePromise;
4175
4178
  }
4176
4179
  /**
@@ -4308,7 +4311,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
4308
4311
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
4309
4312
  const USER_AGENT_HEADER = 'User-Agent';
4310
4313
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
4311
- const SDK_VERSION = '1.0.0'; // x-release-please-version
4314
+ const SDK_VERSION = '1.0.1'; // x-release-please-version
4312
4315
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
4313
4316
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
4314
4317
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';