@teamlearners/clawops 0.11.0 → 0.12.0

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.
@@ -1,4 +1,4 @@
1
- import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-5IY2ZR3F.js';
1
+ import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-KK3OXQT6.js';
2
2
  import pino from 'pino';
3
3
  import * as fs from 'fs';
4
4
  import * as path from 'path';
@@ -3047,11 +3047,8 @@ var GeminiRealtime = class _GeminiRealtime {
3047
3047
  this._closed = false;
3048
3048
  this._sentAudioChunks = 0;
3049
3049
  this._audioRemainder = Buffer.alloc(0);
3050
- if (!this._apiKey) {
3051
- throw new Error("Google API key is required. Set GOOGLE_API_KEY or pass apiKey option.");
3052
- }
3053
3050
  const { GoogleGenAI } = await import('@google/genai/node');
3054
- const client = new GoogleGenAI({ apiKey: this._apiKey });
3051
+ const client = this._apiKey ? new GoogleGenAI({ apiKey: this._apiKey }) : new GoogleGenAI({});
3055
3052
  const config = {
3056
3053
  responseModalities: ["AUDIO"],
3057
3054
  speechConfig: {
@@ -3818,9 +3815,8 @@ var GeminiLLM = class {
3818
3815
  }
3819
3816
  async *generate(messages, options) {
3820
3817
  const { GoogleGenAI } = await import('@google/genai');
3821
- const client = new GoogleGenAI({
3822
- apiKey: this._options.apiKey ?? process.env["GOOGLE_API_KEY"]
3823
- });
3818
+ const apiKey = this._options.apiKey ?? process.env["GOOGLE_API_KEY"];
3819
+ const client = apiKey ? new GoogleGenAI({ apiKey }) : new GoogleGenAI();
3824
3820
  let systemInstruction;
3825
3821
  const contents = [];
3826
3822
  for (const msg of messages) {