@olane/o-intelligence 0.6.3 → 0.6.4

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.
@@ -23,6 +23,7 @@ export declare class IntelligenceTool extends oVirtualTool {
23
23
  choice: oAddress;
24
24
  apiKey: string;
25
25
  options: any;
26
+ method: string;
26
27
  }>;
27
28
  _tool_configure(request: ConfigureRequest): Promise<ToolResult>;
28
29
  _tool_prompt(request: oRequest): Promise<ToolResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"intelligence.tool.d.ts","sourceRoot":"","sources":["../../src/intelligence.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAa,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,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,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAGxE,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,OAAO,CAAC,eAAe,CAAK;gBAChB,MAAM,EAAE,WAAW;IA0DzB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAmBnD,gBAAgB,IAAI,OAAO,CAAC;QAAE,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IAwDvD,iBAAiB,CAAC,QAAQ,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAqEtE,kBAAkB,IAAI,OAAO,CAAC;QAClC,QAAQ,EAAE,iBAAiB,CAAC;QAC5B,OAAO,EAAE,GAAG,CAAC;KACd,CAAC;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,kBAAkB,CACtB,OAAO,EAAE,QAAQ,GAChB,OAAO,CAAC;QACT,MAAM,EAAE,QAAQ,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,GAAG,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IA0BI,eAAe,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC;IA6C/D,YAAY,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,UAAU,CAAC;CAkB3D"}
@@ -219,6 +219,7 @@ export class IntelligenceTool extends oVirtualTool {
219
219
  options: {
220
220
  token: options.token,
221
221
  },
222
+ method: 'prompt',
222
223
  };
223
224
  }
224
225
  const { provider } = await this.getModelProvider();
@@ -227,6 +228,7 @@ export class IntelligenceTool extends oVirtualTool {
227
228
  choice: new oAddress(`o://${provider}`),
228
229
  apiKey,
229
230
  options: {},
231
+ method: 'completion',
230
232
  };
231
233
  }
232
234
  async _tool_configure(request) {
@@ -277,7 +279,7 @@ export class IntelligenceTool extends oVirtualTool {
277
279
  const intelligence = await this.chooseIntelligence(request);
278
280
  this.logger.debug('Using AI provider: ', intelligence.choice);
279
281
  const response = await this.use(intelligence.choice, {
280
- method: 'completion',
282
+ method: intelligence.method,
281
283
  params: {
282
284
  apiKey: intelligence.apiKey,
283
285
  messages: [
@@ -1 +1 @@
1
- {"version":3,"file":"intelligence.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/intelligence.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAuJzD,CAAC"}
1
+ {"version":3,"file":"intelligence.methods.d.ts","sourceRoot":"","sources":["../../../src/methods/intelligence.methods.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,eAAO,MAAM,mBAAmB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAyJzD,CAAC"}
@@ -9,12 +9,14 @@ export const INTELLIGENCE_PARAMS = {
9
9
  type: 'string',
10
10
  value: 'string',
11
11
  description: 'The model provider to use (anthropic, openai, ollama, perplexity, grok, olane)',
12
+ required: false,
12
13
  },
13
14
  {
14
15
  name: 'hostingProvider',
15
16
  type: 'string',
16
17
  value: 'string',
17
18
  description: 'The hosting provider to use (olane, local)',
19
+ required: false,
18
20
  },
19
21
  ],
20
22
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@olane/o-intelligence",
3
- "version": "0.6.3",
3
+ "version": "0.6.4",
4
4
  "type": "module",
5
5
  "main": "dist/src/index.js",
6
6
  "types": "dist/src/index.d.ts",
@@ -54,10 +54,10 @@
54
54
  "typescript": "5.4.5"
55
55
  },
56
56
  "peerDependencies": {
57
- "@olane/o-config": "^0.6.3",
58
- "@olane/o-core": "^0.6.3",
59
- "@olane/o-protocol": "^0.6.3",
60
- "@olane/o-tool": "^0.6.3"
57
+ "@olane/o-config": "^0.6.4",
58
+ "@olane/o-core": "^0.6.4",
59
+ "@olane/o-protocol": "^0.6.4",
60
+ "@olane/o-tool": "^0.6.4"
61
61
  },
62
62
  "dependencies": {
63
63
  "debug": "^4.4.1",