@intelliweave/embedded 1.6.51 → 1.6.52

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.
@@ -149,6 +149,8 @@ interface KnowledgeBaseSource {
149
149
  interface KnowledgeBaseItem {
150
150
  /** Item ID */
151
151
  id?: string;
152
+ /** OpenAI-compatible internal ID. This is set automatically and should not be used. */
153
+ _functionID?: string;
152
154
  /** Item type. */
153
155
  type: 'info' | 'action' | 'tour' | 'input-event' | 'output-event';
154
156
  /** Item name */
@@ -203,6 +205,12 @@ interface KnowledgeBaseWebhookSearchResponse {
203
205
  infoURL?: string;
204
206
  /** Items */
205
207
  items: KnowledgeBaseItem[];
208
+ /**
209
+ * If true, the AI will rerun the search query on every request.
210
+ * Only use this if you have context items that will change externally, as
211
+ * this adds a delay to every request.
212
+ */
213
+ noCache?: boolean;
206
214
  }
207
215
  /** Format for the response to the webhook when type=action */
208
216
  interface KnowledgeBaseWebhookActionResponse {
@@ -325,8 +333,10 @@ declare class IntelliWeave extends EventTarget {
325
333
  conversationID: string;
326
334
  /** Knowledge database interface */
327
335
  knowledgeBase: KnowledgeBase;
328
- /** Current knowledge base items */
329
- private _lastKBentries;
336
+ /** Last KB search that was performed */
337
+ private _lastKBsearch;
338
+ /** If set, the next time a request is made this is the KB result items that will be used, once-off. */
339
+ private _nextRequestUseKBitems?;
330
340
  /** Config loaded from the API */
331
341
  config?: WebWeaverGPTConfig;
332
342
  /** Available LLMs */
@@ -364,8 +374,6 @@ declare class IntelliWeave extends EventTarget {
364
374
  getContextPrefix(): Promise<any>;
365
375
  /** Get system message to send to the AI */
366
376
  onBeforeMessageProcessing(): Promise<void>;
367
- /** Called to update the current knowledge base items */
368
- updateKnowledgeBase(items: KnowledgeBaseItem[]): void;
369
377
  private _lastOutput?;
370
378
  /** @private Process incoming message from the AI. Can be used to respond to encoded actions in the text response. */
371
379
  processIncomingMessage(message: string, isChunk?: boolean): void;
@@ -1303,4 +1311,4 @@ declare function useIntelliWeave(): IntelliWeave | undefined;
1303
1311
  /** React hook to add an external KB search hook. This can provide static KB entries, or perform an async search and return dynamic entries. */
1304
1312
  declare function useIntelliWeaveKnowledge(query: KnowledgeBaseSource['query'], dependencies?: any[]): void;
1305
1313
 
1306
- export { AILogic, AudioSystem, type BufferType, BufferedWebSocket, ChatGPT, type ChatGPTConfig, type ChatGPTToolConfig, FixedBufferStream, IntelliWeave, IntelliWeaveProvider, IntelliWeaveStream, type IntelliWeaveStreamErrorEvent, type IntelliWeaveStreamEvent, type IntelliWeaveStreamTextOutputEvent, IntelliWeaveTranscriptionNode, KnowledgeBase, type KnowledgeBaseItem, type KnowledgeBaseSource, type KnowledgeBaseWebhookActionResponse, type KnowledgeBaseWebhookRequest, type KnowledgeBaseWebhookSearchResponse, Logging, ONNXModel, type ONNXTensors, OpenAITranscriptionNode, PCMPlayerNode, PCMReceiverNode, Resampler, VoiceChunkOutputNode, VoiceDetectionNode, WebWeaverEmbed, type WebWeaverGPTConfig, WebWeaverSpeechOutput, WebWeaverSpeechRecognition, WebWeaverUI, audioToWav, floatTo16BitPCM, floatTo64BitPCM, getDefaultUserID, int16ToFloat32BitPCM, intelliweaveConfig, intelliweaveGlobalThis, sseEvents, trimWhitespaceInText, useIntelliWeave, useIntelliWeaveKnowledge };
1314
+ export { AILogic, AudioSystem, type BufferType, BufferedWebSocket, ChatGPT, type ChatGPTConfig, type ChatGPTToolConfig, FixedBufferStream, IntelliWeave, IntelliWeaveProvider, IntelliWeaveStream, type IntelliWeaveStreamErrorEvent, type IntelliWeaveStreamEvent, type IntelliWeaveStreamTextOutputEvent, IntelliWeaveTranscriptionNode, KnowledgeBase, type KnowledgeBaseItem, type KnowledgeBaseSource, type KnowledgeBaseWebhookActionResponse, type KnowledgeBaseWebhookRequest, type KnowledgeBaseWebhookSearchResponse, Logging, ONNXModel, type ONNXTensors, OpenAITranscriptionNode, PCMPlayerNode, PCMReceiverNode, Resampler, type SupportedArrayBuffers, VoiceChunkOutputNode, VoiceDetectionNode, WebWeaverEmbed, type WebWeaverGPTConfig, WebWeaverSpeechOutput, WebWeaverSpeechRecognition, WebWeaverUI, audioToWav, floatTo16BitPCM, floatTo64BitPCM, getDefaultUserID, int16ToFloat32BitPCM, intelliweaveConfig, intelliweaveGlobalThis, sseEvents, trimWhitespaceInText, useIntelliWeave, useIntelliWeaveKnowledge };