@terryavg/neptune-ai-chatbot 1.0.1 → 1.0.2
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/README.md +137 -2
- package/dist/chat-input-42V4ESQB.mjs +478 -0
- package/dist/chat-input-4T42R7FR.mjs +481 -0
- package/dist/chat-input-BJVIIYOP.mjs +484 -0
- package/dist/chat-input-HT47ZLQN.mjs +456 -0
- package/dist/chat-input-JFGPZBBQ.mjs +495 -0
- package/dist/chat-input-JQ7PSHNW.mjs +515 -0
- package/dist/chat-input-USWVSAYY.mjs +461 -0
- package/dist/chat-input-VTCTV5ED.mjs +495 -0
- package/dist/chat-input-WJMGLQJI.mjs +495 -0
- package/dist/chat-message-2VQW74CO.mjs +2230 -0
- package/dist/chat-message-35ZWSSQV.mjs +1926 -0
- package/dist/chat-message-3CUUWTZG.mjs +2429 -0
- package/dist/chat-message-3NHSJNKL.mjs +2241 -0
- package/dist/chat-message-3Z7B2WYC.mjs +2228 -0
- package/dist/chat-message-564AHZHH.mjs +2186 -0
- package/dist/chat-message-5QLTW4K7.mjs +2122 -0
- package/dist/chat-message-7EH2TDZG.mjs +1910 -0
- package/dist/chat-message-7QHJRHQG.mjs +1909 -0
- package/dist/chat-message-AAXNH5TF.mjs +2088 -0
- package/dist/chat-message-D36YF274.mjs +1910 -0
- package/dist/chat-message-DVCXEL4Z.mjs +2111 -0
- package/dist/chat-message-E6KB3AST.mjs +1906 -0
- package/dist/chat-message-G2NWPAXK.mjs +1904 -0
- package/dist/chat-message-H62Z3DW5.mjs +2368 -0
- package/dist/chat-message-HIEZ7B5R.mjs +2190 -0
- package/dist/chat-message-I6AKFPK6.mjs +2156 -0
- package/dist/chat-message-IKYSAVAB.mjs +1918 -0
- package/dist/chat-message-IZL6JHV2.mjs +2429 -0
- package/dist/chat-message-J7PVUQO6.mjs +1878 -0
- package/dist/chat-message-K6QILTW5.mjs +1897 -0
- package/dist/chat-message-MDORLI2R.mjs +2228 -0
- package/dist/chat-message-MFUY6KOE.mjs +1910 -0
- package/dist/chat-message-MYKOR5OF.mjs +1890 -0
- package/dist/chat-message-NKMTAMGG.mjs +1906 -0
- package/dist/chat-message-NNGD3FUH.mjs +2168 -0
- package/dist/chat-message-QAPRO542.mjs +1915 -0
- package/dist/chat-message-R4IJ3MXU.mjs +2146 -0
- package/dist/chat-message-U7UCBLHI.mjs +2145 -0
- package/dist/chat-message-UKXGFKUR.mjs +1903 -0
- package/dist/chat-message-UNIBCF3T.mjs +1900 -0
- package/dist/chat-message-UXLPL76T.mjs +1890 -0
- package/dist/chat-message-VB54UOHB.mjs +2306 -0
- package/dist/chat-message-WUNUZLKI.mjs +2228 -0
- package/dist/chat-message-WYN5UZRD.mjs +1927 -0
- package/dist/chat-message-Y5OJSR2O.mjs +2228 -0
- package/dist/chat-message-YPDHL6WW.mjs +2114 -0
- package/dist/chunk-26656QB3.mjs +406 -0
- package/dist/chunk-2RXQ2EZ2.mjs +295 -0
- package/dist/chunk-DVWFDUN4.mjs +407 -0
- package/dist/chunk-JLRHY3SB.mjs +405 -0
- package/dist/chunk-XFSEOBLD.mjs +432 -0
- package/dist/index.css +174 -43
- package/dist/index.d.mts +218 -1
- package/dist/index.d.ts +218 -1
- package/dist/index.js +2088 -1400
- package/dist/index.mjs +606 -413
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,226 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Configuration for local development debugging
|
|
6
|
+
*/
|
|
4
7
|
interface LocalDebugConfig {
|
|
8
|
+
/** Username for local authentication */
|
|
5
9
|
username: string;
|
|
10
|
+
/** Password for local authentication */
|
|
6
11
|
password: string;
|
|
12
|
+
/** Base URL for the local API server */
|
|
7
13
|
baseUrl: string;
|
|
8
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Props for the NeptuneChatBot component
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <NeptuneChatBot
|
|
21
|
+
* agentId="your-agent-id"
|
|
22
|
+
* theme="dark"
|
|
23
|
+
* title="My Assistant"
|
|
24
|
+
* messageBubbleColor="#E5E3F8"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
9
28
|
interface NeptuneChatBotProps {
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier for the AI agent
|
|
31
|
+
* @required
|
|
32
|
+
*/
|
|
10
33
|
agentId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Enable debug mode to show console logs and debugging information
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
11
38
|
debug?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Color theme for the chat interface
|
|
41
|
+
* @default "light"
|
|
42
|
+
*/
|
|
12
43
|
theme?: "light" | "dark";
|
|
44
|
+
/**
|
|
45
|
+
* Configuration for local development debugging
|
|
46
|
+
*/
|
|
13
47
|
localDebug?: LocalDebugConfig;
|
|
48
|
+
/**
|
|
49
|
+
* Title displayed in the chat header
|
|
50
|
+
* @default "Naia"
|
|
51
|
+
*/
|
|
52
|
+
title?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Background color for message bubbles in light mode
|
|
55
|
+
* @default "#E5E3F8"
|
|
56
|
+
* @example "#E5E3F8" or "rgba(229, 227, 248, 1)"
|
|
57
|
+
*/
|
|
58
|
+
messageBubbleColor?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Background color for message bubbles in dark mode
|
|
61
|
+
* @default "rgba(168, 140, 250, 0.3)"
|
|
62
|
+
*/
|
|
63
|
+
messageBubbleColorDark?: string;
|
|
64
|
+
/**
|
|
65
|
+
* Accent color for buttons and interactive elements in light mode
|
|
66
|
+
* @default "#8B7FD9"
|
|
67
|
+
*/
|
|
68
|
+
accentColor?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Accent color for buttons and interactive elements in dark mode
|
|
71
|
+
* @default "#A88CFA"
|
|
72
|
+
*/
|
|
73
|
+
accentColorDark?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Color for the scroll-to-bottom button in light mode
|
|
76
|
+
* @default "#6366F1"
|
|
77
|
+
*/
|
|
78
|
+
scrollButtonColor?: string;
|
|
79
|
+
/**
|
|
80
|
+
* Color for the scroll-to-bottom button in dark mode
|
|
81
|
+
* @default "#818CF8"
|
|
82
|
+
*/
|
|
83
|
+
scrollButtonColorDark?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Text displayed while the AI is generating a response
|
|
86
|
+
* @default "NAIA is working on it..."
|
|
87
|
+
*/
|
|
88
|
+
streamingText?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Color of the streaming indicator text in light mode
|
|
91
|
+
* @default "#2563EB"
|
|
92
|
+
*/
|
|
93
|
+
streamingTextColor?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Color of the streaming indicator text in dark mode
|
|
96
|
+
* @default "#818CF8"
|
|
97
|
+
*/
|
|
98
|
+
streamingTextColorDark?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Primary welcome message shown on the initial screen
|
|
101
|
+
* @default "Hi there!"
|
|
102
|
+
*/
|
|
103
|
+
welcomeMessagePrimary?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Secondary welcome message shown below the primary message
|
|
106
|
+
* @default "How can I help you today?"
|
|
107
|
+
*/
|
|
108
|
+
welcomeMessageSecondary?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Path to a custom icon image for the welcome screen (supports png, svg, etc.)
|
|
111
|
+
* @example "/logo.png" or "https://example.com/icon.svg"
|
|
112
|
+
*/
|
|
113
|
+
welcomeIcon?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Size of the welcome icon with CSS units
|
|
116
|
+
* @default "10rem"
|
|
117
|
+
* @example "10rem", "100px", "5em"
|
|
118
|
+
*/
|
|
119
|
+
welcomeIconSize?: string;
|
|
120
|
+
/**
|
|
121
|
+
* Enable streaming responses from the AI
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
streaming?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Background color for the sidebar in light mode
|
|
127
|
+
* @default "#FAFAFA"
|
|
128
|
+
*/
|
|
129
|
+
sidebarBackgroundColor?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Background color for the sidebar in dark mode
|
|
132
|
+
* @default "#1F1F1F"
|
|
133
|
+
*/
|
|
134
|
+
sidebarBackgroundColorDark?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Background color for the chat input field in light mode
|
|
137
|
+
* @default "#FFFFFF"
|
|
138
|
+
*/
|
|
139
|
+
inputBackgroundColor?: string;
|
|
140
|
+
/**
|
|
141
|
+
* Background color for the chat input field in dark mode
|
|
142
|
+
* @default "#303030"
|
|
143
|
+
*/
|
|
144
|
+
inputBackgroundColorDark?: string;
|
|
145
|
+
/**
|
|
146
|
+
* Background color for the header in light mode
|
|
147
|
+
* @default "#FFFFFF"
|
|
148
|
+
*/
|
|
149
|
+
headerBackgroundColor?: string;
|
|
150
|
+
/**
|
|
151
|
+
* Background color for the header in dark mode
|
|
152
|
+
* @default "#1F1F1F"
|
|
153
|
+
*/
|
|
154
|
+
headerBackgroundColorDark?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Base color for vector search results in light mode
|
|
157
|
+
* @default "#9333EA" (purple-600)
|
|
158
|
+
* @example "#3B82F6" for blue, "#10B981" for green
|
|
159
|
+
*/
|
|
160
|
+
vectorColor?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Base color for vector search results in dark mode
|
|
163
|
+
* @default "#A855F7" (purple-500)
|
|
164
|
+
* @example "#60A5FA" for blue, "#34D399" for green
|
|
165
|
+
*/
|
|
166
|
+
vectorColorDark?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Callback fired when a tool starts executing during streaming
|
|
169
|
+
* @param metadata - Event metadata containing tool information
|
|
170
|
+
* @example
|
|
171
|
+
* ```tsx
|
|
172
|
+
* onToolStart={(metadata) => {
|
|
173
|
+
* console.log('Tool started:', metadata.toolName);
|
|
174
|
+
* }}
|
|
175
|
+
* ```
|
|
176
|
+
*/
|
|
177
|
+
onToolStart?: (metadata: any) => void;
|
|
178
|
+
/**
|
|
179
|
+
* Callback fired when tool input is available during streaming
|
|
180
|
+
* @param metadata - Event metadata containing tool input information
|
|
181
|
+
* @example
|
|
182
|
+
* ```tsx
|
|
183
|
+
* onToolInput={(metadata) => {
|
|
184
|
+
* console.log('Tool input received:', metadata);
|
|
185
|
+
* }}
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
onToolInput?: (metadata: any) => void;
|
|
189
|
+
/**
|
|
190
|
+
* Callback fired when a tool finishes executing during streaming
|
|
191
|
+
* @param metadata - Event metadata containing tool output information
|
|
192
|
+
* @example
|
|
193
|
+
* ```tsx
|
|
194
|
+
* onToolFinish={(metadata) => {
|
|
195
|
+
* console.log('Tool finished:', metadata);
|
|
196
|
+
* }}
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
onToolFinish?: (metadata: any) => void;
|
|
200
|
+
/**
|
|
201
|
+
* Callback fired for each text chunk received during streaming
|
|
202
|
+
* @param chunk - The text chunk received
|
|
203
|
+
* @example
|
|
204
|
+
* ```tsx
|
|
205
|
+
* onChunk={(chunk) => {
|
|
206
|
+
* console.log('Received chunk:', chunk);
|
|
207
|
+
* }}
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
onChunk?: (chunk: string) => void;
|
|
211
|
+
/**
|
|
212
|
+
* Callback fired when streaming finishes
|
|
213
|
+
* @param metadata - Final response metadata
|
|
214
|
+
* @example
|
|
215
|
+
* ```tsx
|
|
216
|
+
* onFinish={(metadata) => {
|
|
217
|
+
* console.log('Streaming finished:', metadata);
|
|
218
|
+
* }}
|
|
219
|
+
* ```
|
|
220
|
+
*/
|
|
221
|
+
onFinish?: (metadata: any) => void;
|
|
14
222
|
}
|
|
15
|
-
declare function NeptuneChatBot({ agentId: propAgentId, debug: propDebug, theme: propTheme, localDebug: propLocalDebug, }: NeptuneChatBotProps): react_jsx_runtime.JSX.Element;
|
|
223
|
+
declare function NeptuneChatBot({ agentId: propAgentId, debug: propDebug, theme: propTheme, localDebug: propLocalDebug, title: propTitle, messageBubbleColor, messageBubbleColorDark, accentColor, accentColorDark, scrollButtonColor, scrollButtonColorDark, streamingText, streamingTextColor, streamingTextColorDark, welcomeMessagePrimary, welcomeMessageSecondary, welcomeIcon, welcomeIconSize, streaming, sidebarBackgroundColor, onToolStart, onToolInput, onToolFinish, onChunk, onFinish, sidebarBackgroundColorDark, inputBackgroundColor, inputBackgroundColorDark, headerBackgroundColor, headerBackgroundColorDark, vectorColor, vectorColorDark, }: NeptuneChatBotProps): react_jsx_runtime.JSX.Element;
|
|
16
224
|
|
|
17
225
|
interface TextContent {
|
|
18
226
|
type: "text";
|
|
@@ -48,9 +256,18 @@ interface Step {
|
|
|
48
256
|
text?: string;
|
|
49
257
|
tools?: ToolCall[];
|
|
50
258
|
}
|
|
259
|
+
interface VectorResult {
|
|
260
|
+
rowId: string;
|
|
261
|
+
similarity: string;
|
|
262
|
+
template: string;
|
|
263
|
+
entityName: string;
|
|
264
|
+
data: Record<string, any>;
|
|
265
|
+
}
|
|
51
266
|
interface MessageMetadata {
|
|
52
267
|
logId?: string;
|
|
53
268
|
steps?: Step[];
|
|
269
|
+
vectors?: VectorResult[];
|
|
270
|
+
feedbackPositive?: boolean | null;
|
|
54
271
|
}
|
|
55
272
|
interface Message {
|
|
56
273
|
id: string;
|