@olane/o-intelligence 0.8.10 → 0.8.11

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,CAAsB;gBAExC,MAAM,EAAE,eAAe;IAUnC;;OAEG;IACG,gBAAgB,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAoGpE;;OAEG;YACY,iBAAiB;IAsIhC;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAsGlE;;OAEG;YACY,eAAe;IAwI9B;;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,OA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-519,7 +519,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
519
519
  async _tool_generate_image(request) {
520
520
  try {
521
521
  const params = request.params;
522
- const { model = 'gemini-2.5-flash-image', prompt, aspectRatio = '1:1', imageSize = '2K', negativePrompt, } = params;
522
+ const { model = 'gemini-3-pro-image-preview', prompt, aspectRatio = '1:1', imageSize = '2K', negativePrompt, images, } = params;
523
523
  if (!this.apiKey) {
524
524
  return {
525
525
  success: false,
@@ -536,19 +536,36 @@ export class GeminiIntelligenceTool extends oLaneTool {
536
536
  const fullPrompt = negativePrompt
537
537
  ? `${prompt}\n\nAvoid: ${negativePrompt}`
538
538
  : prompt;
539
+ // Build request parts array with text prompt and optional reference images
540
+ const requestParts = [
541
+ { text: fullPrompt },
542
+ ];
543
+ if (images && Array.isArray(images)) {
544
+ for (const imageDataUri of images) {
545
+ const matches = imageDataUri.match(/^data:([^;]+);base64,(.+)$/);
546
+ if (matches) {
547
+ requestParts.push({
548
+ inline_data: {
549
+ mime_type: matches[1],
550
+ data: matches[2],
551
+ },
552
+ });
553
+ }
554
+ }
555
+ }
539
556
  const imageRequest = {
540
557
  contents: [
541
558
  {
542
- parts: [{ text: fullPrompt }],
559
+ parts: requestParts,
543
560
  },
544
561
  ],
545
- // generationConfig: {
546
- // responseModalities: ['TEXT', 'IMAGE'],
547
- // imageConfig: {
548
- // aspectRatio: aspectRatio as GeminiImageConfig['aspectRatio'],
549
- // imageSize: imageSize as GeminiImageConfig['imageSize'],
550
- // },
551
- // },
562
+ generationConfig: {
563
+ responseModalities: ['TEXT', 'IMAGE'],
564
+ imageConfig: {
565
+ aspectRatio: aspectRatio,
566
+ imageSize: imageSize,
567
+ },
568
+ },
552
569
  };
553
570
  const response = await fetch(`${this.baseUrl}/models/${model}:generateContent`, {
554
571
  method: 'POST',
@@ -574,7 +591,6 @@ export class GeminiIntelligenceTool extends oLaneTool {
574
591
  let imageData;
575
592
  let description;
576
593
  for (const part of parts) {
577
- console.log('part:', part);
578
594
  if (part.inlineData) {
579
595
  imageData = part.inlineData.data;
580
596
  }
@@ -608,7 +624,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
608
624
  async _tool_edit_image(request) {
609
625
  try {
610
626
  const params = request.params;
611
- const { model = 'gemini-2.5-flash-image', prompt, image, aspectRatio, imageSize = '2K', } = params;
627
+ const { model = 'gemini-3-pro-image-preview', prompt, image, aspectRatio, imageSize = '2K', } = params;
612
628
  if (!this.apiKey) {
613
629
  return {
614
630
  success: false,
@@ -1 +1 @@
1
- {"version":3,"file":"llm.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/llm.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CA0QhD,CAAC"}
1
+ {"version":3,"file":"llm.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/llm.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,UAAU,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAkRhD,CAAC"}
@@ -182,7 +182,7 @@ export const LLM_PARAMS = {
182
182
  },
183
183
  generate_image: {
184
184
  name: 'generate_image',
185
- description: 'Generate images using Gemini nano-banana models. Creates images from text prompts using gemini-2.5-flash-image or gemini-3-pro-image-preview.',
185
+ description: 'Generate images using Gemini nano-banana models. Creates images from text prompts using gemini-3-pro-image-preview (Nano Banana Pro).',
186
186
  dependencies: [],
187
187
  parameters: [
188
188
  {
@@ -196,7 +196,7 @@ export const LLM_PARAMS = {
196
196
  name: 'model',
197
197
  type: 'string',
198
198
  value: 'string',
199
- description: 'The model to use for image generation. Options: "gemini-2.5-flash-image" (default) or "gemini-3-pro-image-preview"',
199
+ description: 'The model to use for image generation. Default: "gemini-3-pro-image-preview" (Nano Banana Pro)',
200
200
  required: false,
201
201
  },
202
202
  {
@@ -220,6 +220,13 @@ export const LLM_PARAMS = {
220
220
  description: 'Optional description of what to avoid in the generated image.',
221
221
  required: false,
222
222
  },
223
+ {
224
+ name: 'images',
225
+ type: 'array',
226
+ value: 'string[]',
227
+ description: 'Optional array of reference images as data URIs (data:image/...;base64,...) for context-aware generation',
228
+ required: false,
229
+ },
223
230
  ],
224
231
  },
225
232
  edit_image: {
@@ -245,7 +252,7 @@ export const LLM_PARAMS = {
245
252
  name: 'model',
246
253
  type: 'string',
247
254
  value: 'string',
248
- description: 'The model to use for image editing. Options: "gemini-2.5-flash-image" (default) or "gemini-3-pro-image-preview"',
255
+ description: 'The model to use for image editing. Default: "gemini-3-pro-image-preview" (Nano Banana Pro)',
249
256
  required: false,
250
257
  },
251
258
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-intelligence",
3
- "version": "0.8.10",
3
+ "version": "0.8.11",
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.8.10",
58
- "@olane/o-core": "0.8.10",
59
- "@olane/o-lane": "0.8.10",
60
- "@olane/o-protocol": "0.8.10",
61
- "@olane/o-tool": "0.8.10",
57
+ "@olane/o-config": "0.8.11",
58
+ "@olane/o-core": "0.8.11",
59
+ "@olane/o-lane": "0.8.11",
60
+ "@olane/o-protocol": "0.8.11",
61
+ "@olane/o-tool": "0.8.11",
62
62
  "debug": "^4.4.1",
63
63
  "dotenv": "^16.5.0"
64
64
  },
65
- "gitHead": "fca15d711df7b21772157a7cd3081fdb065367f9"
65
+ "gitHead": "d7f0105bfe79bd4fd873ae2bdae607545f46e1f5"
66
66
  }