@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.
- package/dist/agent/index.cjs +11 -15
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.js +4 -8
- package/dist/agent/index.js.map +1 -1
- package/dist/{chunk-5IY2ZR3F.js → chunk-KK3OXQT6.js} +3 -3
- package/dist/{chunk-5IY2ZR3F.js.map → chunk-KK3OXQT6.js.map} +1 -1
- package/dist/{chunk-COBPAA3N.cjs → chunk-X6VG5NNG.cjs} +3 -3
- package/dist/{chunk-COBPAA3N.cjs.map → chunk-X6VG5NNG.cjs.map} +1 -1
- package/dist/index.cjs +38 -35
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/agent/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DEFAULT_BASE_URL, AgentError, AgentConnectionError, VERSION } from '../chunk-
|
|
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
|
|
3822
|
-
|
|
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) {
|