@olane/o-intelligence 0.8.9 → 0.8.10

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,6 +1,7 @@
1
1
  export declare enum LLMProviders {
2
2
  ANTHROPIC = "anthropic",
3
3
  OPENAI = "openai",
4
+ GEMINI = "gemini",
4
5
  OLLAMA = "ollama",
5
6
  PERPLEXITY = "perplexity",
6
7
  GROK = "grok",
@@ -1 +1 @@
1
- {"version":3,"file":"llm-providers.enum.d.ts","sourceRoot":"","sources":["../../../src/enums/llm-providers.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
1
+ {"version":3,"file":"llm-providers.enum.d.ts","sourceRoot":"","sources":["../../../src/enums/llm-providers.enum.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,SAAS,cAAc;IACvB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB"}
@@ -2,6 +2,7 @@ export var LLMProviders;
2
2
  (function (LLMProviders) {
3
3
  LLMProviders["ANTHROPIC"] = "anthropic";
4
4
  LLMProviders["OPENAI"] = "openai";
5
+ LLMProviders["GEMINI"] = "gemini";
5
6
  LLMProviders["OLLAMA"] = "ollama";
6
7
  LLMProviders["PERPLEXITY"] = "perplexity";
7
8
  LLMProviders["GROK"] = "grok";
@@ -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,EAA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AAM,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,OAAO,CAAC,UAAU,CAAC;IA0J9D;;OAEG;YACW,mBAAmB;CA0BlC"}
@@ -14,7 +14,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
14
14
  });
15
15
  this.apiKey = process.env.GEMINI_API_KEY || '';
16
16
  this.baseUrl = 'https://generativelanguage.googleapis.com/v1beta';
17
- this.defaultModel = 'gemini-3-pro-preview';
17
+ this.defaultModel = 'gemini-2.5-flash';
18
18
  }
19
19
  /**
20
20
  * Chat completion with Gemini
@@ -27,8 +27,8 @@ export class GeminiIntelligenceTool extends oLaneTool {
27
27
  return StreamUtils.processGenerator(request, this._streamCompletion(request), request.stream);
28
28
  }
29
29
  try {
30
- const { model = this.defaultModel, messages, ...options } = params;
31
- if (!this.apiKey) {
30
+ const { model = this.defaultModel, messages, apiKey = this.apiKey, ...options } = params;
31
+ if (!apiKey) {
32
32
  return {
33
33
  success: false,
34
34
  error: 'Gemini API key is required',
@@ -62,7 +62,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
62
62
  method: 'POST',
63
63
  headers: {
64
64
  'Content-Type': 'application/json',
65
- 'x-goog-api-key': this.apiKey,
65
+ 'x-goog-api-key': apiKey,
66
66
  },
67
67
  body: JSON.stringify(chatRequest),
68
68
  });
@@ -101,8 +101,8 @@ export class GeminiIntelligenceTool extends oLaneTool {
101
101
  async *_streamCompletion(request) {
102
102
  try {
103
103
  const params = request.params;
104
- const { model = this.defaultModel, messages, ...options } = params;
105
- if (!this.apiKey) {
104
+ const { model = this.defaultModel, messages, apiKey = this.apiKey, ...options } = params;
105
+ if (!apiKey) {
106
106
  yield {
107
107
  success: false,
108
108
  error: 'Gemini API key is required',
@@ -138,7 +138,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
138
138
  method: 'POST',
139
139
  headers: {
140
140
  'Content-Type': 'application/json',
141
- 'x-goog-api-key': this.apiKey,
141
+ 'x-goog-api-key': apiKey,
142
142
  },
143
143
  body: JSON.stringify(chatRequest),
144
144
  });
@@ -219,8 +219,8 @@ export class GeminiIntelligenceTool extends oLaneTool {
219
219
  return StreamUtils.processGenerator(request, this._streamGenerate(request), request.stream);
220
220
  }
221
221
  try {
222
- const { model = this.defaultModel, prompt, system, ...options } = params;
223
- if (!this.apiKey) {
222
+ const { model = this.defaultModel, prompt, system, apiKey = this.apiKey, ...options } = params;
223
+ if (!apiKey) {
224
224
  return {
225
225
  success: false,
226
226
  error: 'Gemini API key is required',
@@ -255,7 +255,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
255
255
  method: 'POST',
256
256
  headers: {
257
257
  'Content-Type': 'application/json',
258
- 'x-goog-api-key': this.apiKey,
258
+ 'x-goog-api-key': apiKey,
259
259
  },
260
260
  body: JSON.stringify(generateRequest),
261
261
  });
@@ -294,8 +294,8 @@ export class GeminiIntelligenceTool extends oLaneTool {
294
294
  async *_streamGenerate(request) {
295
295
  try {
296
296
  const params = request.params;
297
- const { model = this.defaultModel, prompt, system, ...options } = params;
298
- if (!this.apiKey) {
297
+ const { model = this.defaultModel, prompt, system, apiKey = this.apiKey, ...options } = params;
298
+ if (!apiKey) {
299
299
  yield {
300
300
  success: false,
301
301
  error: 'Gemini API key is required',
@@ -332,7 +332,7 @@ export class GeminiIntelligenceTool extends oLaneTool {
332
332
  method: 'POST',
333
333
  headers: {
334
334
  'Content-Type': 'application/json',
335
- 'x-goog-api-key': this.apiKey,
335
+ 'x-goog-api-key': apiKey,
336
336
  },
337
337
  body: JSON.stringify(generateRequest),
338
338
  });
@@ -1 +1 @@
1
- {"version":3,"file":"o-intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/o-intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAa,MAAM,eAAe,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAEhD,qBAAa,gBAAiB,SAAQ,SAAS;IAC7C,OAAO,CAAC,eAAe,CAAK;gBAChB,MAAM,EAAE,eAAe;IAuB7B,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmBnD,gBAAgB,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IA6DvD,iBAAiB,CAAC,QAA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C;IA6DvD,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAsEtE,cAAc,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAa7C,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC;QACxD,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,GAAG,CAAC;QACb,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;IA6BI,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IAsD/D,YAAY,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC;IA0DzD,mBAAmB;IA2CnB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAIlC"}
@@ -1,6 +1,7 @@
1
1
  import { CoreUtils, oAddress, oResponse } from '@olane/o-core';
2
2
  import { AnthropicIntelligenceTool } from './anthropic-intelligence.tool.js';
3
3
  import { OpenAIIntelligenceTool } from './openai-intelligence.tool.js';
4
+ import { GeminiIntelligenceTool } from './gemini-intelligence.tool.js';
4
5
  import { OllamaIntelligenceTool } from './ollama-intelligence.tool.js';
5
6
  import { PerplexityIntelligenceTool } from './perplexity-intelligence.tool.js';
6
7
  import { GrokIntelligenceTool } from './grok-intelligence.tool.js';
@@ -75,7 +76,7 @@ export class IntelligenceTool extends oLaneTool {
75
76
  const modelResponse = await this.use(new oAddress('o://human'), {
76
77
  method: 'question',
77
78
  params: {
78
- question: 'Which AI model do you want to use? (anthropic, openai, ollama, perplexity, grok)',
79
+ question: 'Which AI model do you want to use? (anthropic, openai, gemini, ollama, perplexity, grok)',
79
80
  },
80
81
  });
81
82
  // process the human response
@@ -303,6 +304,11 @@ export class IntelligenceTool extends oLaneTool {
303
304
  parent: this.address,
304
305
  leader: this.leader,
305
306
  }),
307
+ new GeminiIntelligenceTool({
308
+ ...config,
309
+ parent: this.address,
310
+ leader: this.leader,
311
+ }),
306
312
  new OllamaIntelligenceTool({
307
313
  ...config,
308
314
  parent: this.address,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-intelligence",
3
- "version": "0.8.9",
3
+ "version": "0.8.10",
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.9",
58
- "@olane/o-core": "0.8.9",
59
- "@olane/o-lane": "0.8.9",
60
- "@olane/o-protocol": "0.8.9",
61
- "@olane/o-tool": "0.8.9",
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",
62
62
  "debug": "^4.4.1",
63
63
  "dotenv": "^16.5.0"
64
64
  },
65
- "gitHead": "52eeade3be43cac5c7bbc9222ae5815a30355519"
65
+ "gitHead": "fca15d711df7b21772157a7cd3081fdb065367f9"
66
66
  }