@olane/o-intelligence 0.7.61 → 0.7.62
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gemini-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/gemini-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAEL,eAAe,EACf,cAAc,EAEf,MAAM,eAAe,CAAC;AA2JvB,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAoC;IAC5D,SAAS,CAAC,OAAO,EAAE,MAAM,CAC4B;IACrD,SAAS,CAAC,YAAY,EAAE,MAAM,CAA0B;gBAE5C,MAAM,EAAE,eAAe;IAUnC;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IA6FpE;;OAEG;YACY,iBAAiB;IA+HhC;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IA8FlE;;OAEG;YACY,eAAe;IAgI9B;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwC/D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0C9D;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAgC1D;;OAEG;IACG,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"gemini-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/gemini-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAEL,eAAe,EACf,cAAc,EAEf,MAAM,eAAe,CAAC;AA2JvB,qBAAa,sBAAuB,SAAQ,SAAS;IACnD,SAAS,CAAC,MAAM,EAAE,MAAM,CAAoC;IAC5D,SAAS,CAAC,OAAO,EAAE,MAAM,CAC4B;IACrD,SAAS,CAAC,YAAY,EAAE,MAAM,CAA0B;gBAE5C,MAAM,EAAE,eAAe;IAUnC;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IA6FpE;;OAEG;YACY,iBAAiB;IA+HhC;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IA8FlE;;OAEG;YACY,eAAe;IAgI9B;;OAEG;IACG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAwC/D;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0C9D;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IAgC1D;;OAEG;IACG,oBAAoB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA2GlE;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;IA0J9D;;OAEG;YACW,mBAAmB;CA0BlC"}
|
|
@@ -534,13 +534,13 @@ export class GeminiIntelligenceTool extends oLaneTool {
|
|
|
534
534
|
parts: [{ text: fullPrompt }],
|
|
535
535
|
},
|
|
536
536
|
],
|
|
537
|
-
generationConfig: {
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
},
|
|
537
|
+
// generationConfig: {
|
|
538
|
+
// responseModalities: ['TEXT', 'IMAGE'],
|
|
539
|
+
// imageConfig: {
|
|
540
|
+
// aspectRatio: aspectRatio as GeminiImageConfig['aspectRatio'],
|
|
541
|
+
// imageSize: imageSize as GeminiImageConfig['imageSize'],
|
|
542
|
+
// },
|
|
543
|
+
// },
|
|
544
544
|
};
|
|
545
545
|
const response = await fetch(`${this.baseUrl}/models/${model}:generateContent`, {
|
|
546
546
|
method: 'POST',
|
|
@@ -559,28 +559,23 @@ export class GeminiIntelligenceTool extends oLaneTool {
|
|
|
559
559
|
}
|
|
560
560
|
const result = (await response.json());
|
|
561
561
|
if (!result.candidates || result.candidates.length === 0) {
|
|
562
|
-
|
|
563
|
-
success: false,
|
|
564
|
-
error: 'No response generated from Gemini',
|
|
565
|
-
};
|
|
562
|
+
throw new Error('No response generated from Gemini');
|
|
566
563
|
}
|
|
567
564
|
// Extract image and text from response parts
|
|
568
565
|
const parts = result.candidates[0].content.parts;
|
|
569
566
|
let imageData;
|
|
570
567
|
let description;
|
|
571
568
|
for (const part of parts) {
|
|
572
|
-
|
|
573
|
-
|
|
569
|
+
console.log('part:', part);
|
|
570
|
+
if (part.inlineData) {
|
|
571
|
+
imageData = part.inlineData.data;
|
|
574
572
|
}
|
|
575
573
|
else if (part.text) {
|
|
576
574
|
description = part.text;
|
|
577
575
|
}
|
|
578
576
|
}
|
|
579
577
|
if (!imageData) {
|
|
580
|
-
|
|
581
|
-
success: false,
|
|
582
|
-
error: 'No image data in response',
|
|
583
|
-
};
|
|
578
|
+
throw new Error('No image data in response');
|
|
584
579
|
}
|
|
585
580
|
return {
|
|
586
581
|
success: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@olane/o-intelligence",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.62",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"typescript": "5.4.5"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"@olane/o-config": "0.7.
|
|
58
|
-
"@olane/o-core": "0.7.
|
|
59
|
-
"@olane/o-lane": "0.7.
|
|
60
|
-
"@olane/o-protocol": "0.7.
|
|
61
|
-
"@olane/o-tool": "0.7.
|
|
57
|
+
"@olane/o-config": "0.7.62",
|
|
58
|
+
"@olane/o-core": "0.7.62",
|
|
59
|
+
"@olane/o-lane": "0.7.62",
|
|
60
|
+
"@olane/o-protocol": "0.7.62",
|
|
61
|
+
"@olane/o-tool": "0.7.62",
|
|
62
62
|
"debug": "^4.4.1",
|
|
63
63
|
"dotenv": "^16.5.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "98ea2724c4a764edb33f6fec648d735ed5c236af"
|
|
66
66
|
}
|