@intelliweave/embedded 2.0.72-beta.9 → 2.1.74
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/component/chunk-AIYMQX7V.js +1 -0
- package/dist/component/component.d.ts +45 -4
- package/dist/component/component.js +68 -68
- package/dist/component/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/component/ort.bundle.min-7MVUFTYX.js +2848 -0
- package/dist/intelliweave-wordpress.zip +0 -0
- package/dist/node/node.d.ts +46 -5
- package/dist/node/node.js +19 -19
- package/dist/react/react.d.ts +53 -6
- package/dist/react/react.js +24 -24
- package/dist/script-tag/chunk-AIYMQX7V.js +1 -0
- package/dist/script-tag/ort-wasm-simd-threaded.jsep.wasm +0 -0
- package/dist/script-tag/ort.bundle.min-7MVUFTYX.js +2848 -0
- package/dist/script-tag/script-tag.js +68 -68
- package/dist/webpack/index.d.ts +77 -7
- package/dist/webpack/index.js +25 -25
- package/package.json +12 -12
- package/dist/component/chunk-FSRPMVAS.js +0 -1
- package/dist/component/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/component/ort.bundle.min-4BREXDX3.js +0 -1834
- package/dist/script-tag/chunk-FSRPMVAS.js +0 -1
- package/dist/script-tag/ort-wasm-simd-threaded.wasm +0 -0
- package/dist/script-tag/ort.bundle.min-4BREXDX3.js +0 -1834
package/dist/webpack/index.d.ts
CHANGED
|
@@ -65,6 +65,8 @@ declare class TokenWindowGroup<DataType> {
|
|
|
65
65
|
recalculateTokens(): void;
|
|
66
66
|
/** Add an item to the group */
|
|
67
67
|
add(item: string | TokenWindowGroupItemParams<DataType>): TokenWindowGroupItem<DataType>;
|
|
68
|
+
/** Manually remove an item */
|
|
69
|
+
remove(itemId: string): boolean;
|
|
68
70
|
/** Get all items as a string */
|
|
69
71
|
getAllAsString(): string;
|
|
70
72
|
/** Get all items. Doesn't return disabled items. */
|
|
@@ -466,6 +468,8 @@ declare class KnowledgeBase {
|
|
|
466
468
|
allowWindowSources: boolean;
|
|
467
469
|
/** If true, allows using knowledge specified in the global configuration object */
|
|
468
470
|
allowGlobalConfigSources: boolean;
|
|
471
|
+
/** If true, allows the AI to search the knowledge base. If false, essentially disables RAG lookup. */
|
|
472
|
+
allowRagSearch: boolean;
|
|
469
473
|
/** Constructor */
|
|
470
474
|
constructor(ai: IntelliWeave);
|
|
471
475
|
/** Ensures the internal knowledge is set correctly */
|
|
@@ -494,7 +498,7 @@ declare class KnowledgeBase {
|
|
|
494
498
|
/** Create and register an external knowledge base source from a URL */
|
|
495
499
|
registerSourceFromURL(url: string, id?: string): void;
|
|
496
500
|
/** Clone this instance */
|
|
497
|
-
clone(): KnowledgeBase;
|
|
501
|
+
clone(newIW: IntelliWeave): KnowledgeBase;
|
|
498
502
|
/** Registers an MCP server as a knowledge base source */
|
|
499
503
|
registerMCPSource(config: MCPKnowledgeClient['config']): MCPKnowledgeClient;
|
|
500
504
|
}
|
|
@@ -824,6 +828,8 @@ interface SubAgentConfig {
|
|
|
824
828
|
usageInstructions?: string;
|
|
825
829
|
/** If true, will remove all Persona knowledge entries */
|
|
826
830
|
clearExistingKnowledge?: boolean;
|
|
831
|
+
/** Disable RAG search for subagents. If true, only KB entries with isContext=true will be used. */
|
|
832
|
+
disableRagSearch?: boolean;
|
|
827
833
|
/** Extra knowledge base sources for the sub-agent */
|
|
828
834
|
knowledge?: KnowledgeFetcher;
|
|
829
835
|
/** Optional extra configuration for the subagent instance */
|
|
@@ -912,6 +918,13 @@ interface WebWeaverGPTConfig {
|
|
|
912
918
|
/** Subagents */
|
|
913
919
|
subagents?: SubAgentConfig[];
|
|
914
920
|
}
|
|
921
|
+
/** Configuration for the IntelliWeave initialization */
|
|
922
|
+
interface IntelliWeaveConfig extends Partial<WebWeaverGPTConfig> {
|
|
923
|
+
/** Optionally allows you to specify a custom hub API URL. */
|
|
924
|
+
hubAPI?: string;
|
|
925
|
+
/** A unique ID to identify this user. Defaults to a generated userID if not specified. */
|
|
926
|
+
userID?: string;
|
|
927
|
+
}
|
|
915
928
|
/**
|
|
916
929
|
* IntelliWeave interface, loads a Persona from the hub and allows you to interact with it. This is the main entry point into the IntelliWeave
|
|
917
930
|
* SDK when not using the built-in UI.
|
|
@@ -983,12 +996,14 @@ declare class IntelliWeave extends EventTarget {
|
|
|
983
996
|
/** URL of the IntelliWeave Hub API */
|
|
984
997
|
hubAPI: string;
|
|
985
998
|
/** Set model and load data from an API key */
|
|
986
|
-
load(apiKey: string, config?:
|
|
999
|
+
load(apiKey: string, config?: IntelliWeaveConfig): Promise<IntelliWeave>;
|
|
987
1000
|
/** Set the current model */
|
|
988
1001
|
setModel(id: string): void;
|
|
989
1002
|
private _lastSystemMsg;
|
|
990
1003
|
/** Get the system message prefix, before the KB entries are added */
|
|
991
1004
|
getContextPrefix(): Promise<string>;
|
|
1005
|
+
/** KB items added in the last run */
|
|
1006
|
+
private lastKBItems;
|
|
992
1007
|
/** Get system message to send to the AI */
|
|
993
1008
|
onBeforeMessageProcessing(): Promise<void>;
|
|
994
1009
|
/** @private Process incoming message(s) from the AI. Can be used to respond to encoded actions in the text response. */
|
|
@@ -1204,7 +1219,7 @@ declare class IntelliWeaveTranscriptionNode extends VoiceChunkOutputNode {
|
|
|
1204
1219
|
static debugExportWav: boolean;
|
|
1205
1220
|
/** Server address for transcription */
|
|
1206
1221
|
apiAddress: string;
|
|
1207
|
-
/**
|
|
1222
|
+
/** IntelliWeave API key */
|
|
1208
1223
|
apiKey: string;
|
|
1209
1224
|
/** WebSocket connection */
|
|
1210
1225
|
private ws?;
|
|
@@ -1224,6 +1239,32 @@ declare class IntelliWeaveTranscriptionNode extends VoiceChunkOutputNode {
|
|
|
1224
1239
|
onSocketClose(): void;
|
|
1225
1240
|
}
|
|
1226
1241
|
|
|
1242
|
+
/**
|
|
1243
|
+
* This AudioNode uses ElevenLabs to transcribe spoken speech to text.
|
|
1244
|
+
*
|
|
1245
|
+
* - event `transcription` - Fired when a transcription is ready. `text` contains the transcribed text.
|
|
1246
|
+
*/
|
|
1247
|
+
declare class ElevenLabsTranscriptionNode extends VoiceChunkOutputNode {
|
|
1248
|
+
/** ElevenLabs API key */
|
|
1249
|
+
apiKey: string;
|
|
1250
|
+
/** ElevenLabs stream connection */
|
|
1251
|
+
private connection?;
|
|
1252
|
+
/** True if currently transcribing */
|
|
1253
|
+
isTranscribing: boolean;
|
|
1254
|
+
/** WebSocket shutdown timer */
|
|
1255
|
+
private shutdownTimer?;
|
|
1256
|
+
/** Constructor */
|
|
1257
|
+
constructor(audioContext: AudioContext, apiKey: string);
|
|
1258
|
+
/** Called when a voice chunk is received */
|
|
1259
|
+
onVoiceChunk(buffer: Float32Array): Promise<void>;
|
|
1260
|
+
/** Start reading the stream */
|
|
1261
|
+
private startReading;
|
|
1262
|
+
/** Called when the voice recording ends */
|
|
1263
|
+
onVoiceEnd(buffers: Float32Array[]): Promise<void>;
|
|
1264
|
+
/** Called when a transcription is ready */
|
|
1265
|
+
onVoiceTranscription(text: string): void;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1227
1268
|
/**
|
|
1228
1269
|
* Handles speech recognition from the microphone
|
|
1229
1270
|
*
|
|
@@ -1249,7 +1290,7 @@ declare class WebWeaverSpeechRecognition extends EventTarget {
|
|
|
1249
1290
|
/** Returns true if speech recognition is supported by this persona and browser */
|
|
1250
1291
|
get isSupported(): boolean;
|
|
1251
1292
|
/** Currently active voice detection node */
|
|
1252
|
-
voiceDetection?: IntelliWeaveTranscriptionNode | OpenAITranscriptionNode;
|
|
1293
|
+
voiceDetection?: IntelliWeaveTranscriptionNode | OpenAITranscriptionNode | ElevenLabsTranscriptionNode;
|
|
1253
1294
|
/** Constructor */
|
|
1254
1295
|
constructor(ai: IntelliWeave);
|
|
1255
1296
|
private _skipEvents;
|
|
@@ -1344,6 +1385,29 @@ interface ElevenLabsTextToSpeechStream {
|
|
|
1344
1385
|
}
|
|
1345
1386
|
/** This creates a two-way connection to ElevenLabs that allows for realtime text upload and realtime speech download. */
|
|
1346
1387
|
declare function createElevenLabsTextToSpeechStream(apiKey: string, voiceID: string, format?: string): ElevenLabsTextToSpeechStream;
|
|
1388
|
+
/** Return value of createElevenLabsSpeechToTextStream() */
|
|
1389
|
+
interface ElevenLabsSpeechToTextStream {
|
|
1390
|
+
/** Audio data output stream */
|
|
1391
|
+
stream: ReadableStream<string>;
|
|
1392
|
+
/** Function to send audio to be processed */
|
|
1393
|
+
sendAudio: (audio: ArrayBuffer) => void;
|
|
1394
|
+
/** Function to signal speech has stopped. Only necessary if commitStrategy is 'manual' */
|
|
1395
|
+
commit: () => void;
|
|
1396
|
+
/** Function to close the connection */
|
|
1397
|
+
close: () => void;
|
|
1398
|
+
/** True if this connection is closed */
|
|
1399
|
+
isClosed?: boolean;
|
|
1400
|
+
}
|
|
1401
|
+
/** This creates a two-way connection to ElevenLabs that allows for realtime speech upload and text download. */
|
|
1402
|
+
declare function createElevenLabsSpeechToTextStream(
|
|
1403
|
+
/** ElevenLabs API key */
|
|
1404
|
+
apiKey: string,
|
|
1405
|
+
/** Format the audio data you're passing is in */
|
|
1406
|
+
inputAudioFormat?: string,
|
|
1407
|
+
/** Input audio sample rate */
|
|
1408
|
+
sampleRate?: number,
|
|
1409
|
+
/** Should ElevenLabs detect speech end, or will you call commit() manually */
|
|
1410
|
+
commitStrategy?: 'manual' | 'vad'): ElevenLabsSpeechToTextStream;
|
|
1347
1411
|
|
|
1348
1412
|
/**
|
|
1349
1413
|
* This is a utility class for dealing with the ONNX runtime and model loading.
|
|
@@ -2177,9 +2241,15 @@ declare const WebWeaverUI: (props: {
|
|
|
2177
2241
|
/** Vertical position: 'top' or 'bottom' (default: 'bottom') - only used when positioningMode is 'fixed' */
|
|
2178
2242
|
positionY?: "top" | "bottom";
|
|
2179
2243
|
}) => React.JSX.Element | null;
|
|
2180
|
-
/**
|
|
2244
|
+
/** Web Component ... React supports any registered Web Component with dashes in the name, but they don't get TypeScript definitions */
|
|
2181
2245
|
declare global {
|
|
2182
|
-
|
|
2246
|
+
namespace JSX {
|
|
2247
|
+
interface IntrinsicElements {
|
|
2248
|
+
'intelliweave-embed': any;
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
declare module 'react' {
|
|
2183
2253
|
namespace JSX {
|
|
2184
2254
|
interface IntrinsicElements {
|
|
2185
2255
|
'intelliweave-embed': any;
|
|
@@ -2205,4 +2275,4 @@ declare function useIntelliWeave(): IntelliWeave | undefined;
|
|
|
2205
2275
|
/** React hook to add an external KB search hook. This can provide static KB entries, or perform an async search and return dynamic entries. */
|
|
2206
2276
|
declare function useIntelliWeaveKnowledge(query: KnowledgeBaseSource['query'], dependencies?: any[]): void;
|
|
2207
2277
|
|
|
2208
|
-
export { AILogic, AnthropicChat, AudioSystem, type BaseStatisticsEvent, type BufferType, BufferedWebSocket, type BuiltInActionFlags, ChatBase, type ChatBaseConfig, type ChatBaseToolConfig, ChatGPT, type ElevenLabsTextToSpeechStream, FixedBufferStream, type InputStatisticsEvent, IntelliWeave, type IntelliWeaveGlobalConfig, type IntelliWeaveInstructConfig, IntelliWeaveMessageParser, type IntelliWeaveParameterDefinition, IntelliWeaveProvider, IntelliWeaveTranscriptionNode, KnowledgeBase, type KnowledgeBaseActionParameterSchema, type KnowledgeBaseItem, type KnowledgeBaseItemAttachment, type KnowledgeBaseSearchEvent, type KnowledgeBaseSource, type KnowledgeBaseWebhookActionResponse, type KnowledgeBaseWebhookRequest, type KnowledgeBaseWebhookSearchResponse, type KnowledgeFetcher, Logging, MCPKnowledgeClient, type MessageReceiveEvent, type MessageSendEvent, ONNXModel, type ONNXTensors, OpenAITranscriptionNode, PCMPlayerNode, PCMReceiverNode, Resampler, type SessionStartEvent, type StatisticsEvent, type StatisticsEventType, type SubAgentConfig, SubAgents, type SupportedArrayBuffers, TokenWindow, TokenWindowGroup, type TokenWindowGroupItem, type TokenWindowGroupItemParams, type TokenWindowGroupItemSection, TokenWindowGroupItemSectionType, type ToolCallEvent, type UICloseEvent, type UIOpenEvent, VoiceChunkOutputNode, VoiceDetectionNode, type VoiceEndEvent, type VoiceStartEvent, type VoiceSubmitEvent, WebWeaverEmbed, type WebWeaverGPTConfig, WebWeaverSpeechOutput, WebWeaverSpeechRecognition, WebWeaverUI, audioToWav, convertParamsToJSONSchema, createElevenLabsTextToSpeechStream, floatTo16BitPCM, floatTo64BitPCM, getDefaultUserID, int16ToFloat32BitPCM, intelliweaveConfig, intelliweaveGlobalThis, sseEvents, track, trimWhitespaceInText, useIntelliWeave, useIntelliWeaveKnowledge };
|
|
2278
|
+
export { AILogic, AnthropicChat, AudioSystem, type BaseStatisticsEvent, type BufferType, BufferedWebSocket, type BuiltInActionFlags, ChatBase, type ChatBaseConfig, type ChatBaseToolConfig, ChatGPT, type ElevenLabsSpeechToTextStream, type ElevenLabsTextToSpeechStream, ElevenLabsTranscriptionNode, FixedBufferStream, type InputStatisticsEvent, IntelliWeave, type IntelliWeaveConfig, type IntelliWeaveGlobalConfig, type IntelliWeaveInstructConfig, IntelliWeaveMessageParser, type IntelliWeaveParameterDefinition, IntelliWeaveProvider, IntelliWeaveTranscriptionNode, KnowledgeBase, type KnowledgeBaseActionParameterSchema, type KnowledgeBaseItem, type KnowledgeBaseItemAttachment, type KnowledgeBaseSearchEvent, type KnowledgeBaseSource, type KnowledgeBaseWebhookActionResponse, type KnowledgeBaseWebhookRequest, type KnowledgeBaseWebhookSearchResponse, type KnowledgeFetcher, Logging, MCPKnowledgeClient, type MessageReceiveEvent, type MessageSendEvent, ONNXModel, type ONNXTensors, OpenAITranscriptionNode, PCMPlayerNode, PCMReceiverNode, Resampler, type SessionStartEvent, type StatisticsEvent, type StatisticsEventType, type SubAgentConfig, SubAgents, type SupportedArrayBuffers, TokenWindow, TokenWindowGroup, type TokenWindowGroupItem, type TokenWindowGroupItemParams, type TokenWindowGroupItemSection, TokenWindowGroupItemSectionType, type ToolCallEvent, type UICloseEvent, type UIOpenEvent, VoiceChunkOutputNode, VoiceDetectionNode, type VoiceEndEvent, type VoiceStartEvent, type VoiceSubmitEvent, WebWeaverEmbed, type WebWeaverGPTConfig, WebWeaverSpeechOutput, WebWeaverSpeechRecognition, WebWeaverUI, audioToWav, convertParamsToJSONSchema, createElevenLabsSpeechToTextStream, createElevenLabsTextToSpeechStream, floatTo16BitPCM, floatTo64BitPCM, getDefaultUserID, int16ToFloat32BitPCM, intelliweaveConfig, intelliweaveGlobalThis, sseEvents, track, trimWhitespaceInText, useIntelliWeave, useIntelliWeaveKnowledge };
|