@blueharford/scrypted-spatial-awareness 0.6.28 → 0.6.29
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/main.nodejs.js +1 -1
- package/dist/main.nodejs.js.map +1 -1
- package/dist/plugin.zip +0 -0
- package/out/main.nodejs.js +15 -7
- package/out/main.nodejs.js.map +1 -1
- package/out/plugin.zip +0 -0
- package/package.json +1 -1
- package/src/main.ts +15 -7
package/out/plugin.zip
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/main.ts
CHANGED
|
@@ -238,12 +238,19 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
238
238
|
},
|
|
239
239
|
|
|
240
240
|
// Integrations
|
|
241
|
-
|
|
241
|
+
llmPlugin: {
|
|
242
|
+
title: 'LLM Plugin',
|
|
243
|
+
type: 'device',
|
|
244
|
+
deviceFilter: `interfaces.includes('DeviceProvider') && interfaces.includes('Settings')`,
|
|
245
|
+
description: 'Select the LLM plugin to use (e.g., OpenAI, Anthropic, Ollama from @scrypted/llm)',
|
|
246
|
+
group: 'Integrations',
|
|
247
|
+
},
|
|
248
|
+
llmProviders: {
|
|
242
249
|
title: 'LLM Providers',
|
|
243
250
|
type: 'device',
|
|
244
251
|
multiple: true,
|
|
245
252
|
deviceFilter: `interfaces.includes('ChatCompletion')`,
|
|
246
|
-
description: 'Select
|
|
253
|
+
description: 'Select which providers to use from your LLM plugin. Multiple providers will be load-balanced.',
|
|
247
254
|
group: 'Integrations',
|
|
248
255
|
},
|
|
249
256
|
defaultNotifiers: {
|
|
@@ -363,7 +370,7 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
363
370
|
loiteringThreshold: (this.storageSettings.values.loiteringThreshold as number || 3) * 1000,
|
|
364
371
|
objectAlertCooldown: (this.storageSettings.values.objectAlertCooldown as number || 30) * 1000,
|
|
365
372
|
useLlmDescriptions: this.storageSettings.values.useLlmDescriptions as boolean ?? true,
|
|
366
|
-
llmDeviceIds: this.
|
|
373
|
+
llmDeviceIds: this.parseLlmProviders(),
|
|
367
374
|
llmDebounceInterval: (this.storageSettings.values.llmDebounceInterval as number || 30) * 1000,
|
|
368
375
|
llmFallbackEnabled: this.storageSettings.values.llmFallbackEnabled as boolean ?? true,
|
|
369
376
|
llmFallbackTimeout: (this.storageSettings.values.llmFallbackTimeout as number || 3) * 1000,
|
|
@@ -418,9 +425,9 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
418
425
|
}
|
|
419
426
|
}
|
|
420
427
|
|
|
421
|
-
/** Parse LLM
|
|
422
|
-
private
|
|
423
|
-
const value = this.storageSettings.values.
|
|
428
|
+
/** Parse LLM providers from settings - handles both array and single value formats */
|
|
429
|
+
private parseLlmProviders(): string[] | undefined {
|
|
430
|
+
const value = this.storageSettings.values.llmProviders;
|
|
424
431
|
if (!value) return undefined;
|
|
425
432
|
|
|
426
433
|
// Handle array format
|
|
@@ -754,7 +761,8 @@ export class SpatialAwarenessPlugin extends ScryptedDeviceBase
|
|
|
754
761
|
key === 'llmDebounceInterval' ||
|
|
755
762
|
key === 'llmFallbackEnabled' ||
|
|
756
763
|
key === 'llmFallbackTimeout' ||
|
|
757
|
-
key === '
|
|
764
|
+
key === 'llmPlugin' ||
|
|
765
|
+
key === 'llmProviders' ||
|
|
758
766
|
key === 'enableTransitTimeLearning' ||
|
|
759
767
|
key === 'enableConnectionSuggestions' ||
|
|
760
768
|
key === 'enableLandmarkLearning' ||
|