langflow-chatbot
Version:
Add a Langflow-powered chatbot to your website.
20 lines (19 loc) • 3.43 kB
TypeScript
export declare const SVG_CHAT_ICON = "<svg viewBox=\"0 0 24 24\" fill=\"currentColor\"><path d=\"M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H6l-2 2V4h16v12z\"></path></svg>";
export declare const SVG_MINIMIZE_ICON = "<svg viewBox=\"0 0 24 24\" stroke-width=\"2\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M18 12H6\"></path></svg>";
export declare const SVG_RESET_ICON = "<svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"23 4 23 10 17 10\"></polyline><polyline points=\"1 20 1 14 7 14\"></polyline><path d=\"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15\"></path></svg>";
export declare const DEFAULT_ENABLE_STREAM = true;
export declare const DEFAULT_USE_FLOATING = false;
export declare const DEFAULT_FLOAT_POSITION: "bottom-right" | "bottom-left" | "top-right" | "top-left";
export declare const DEFAULT_DATETIME_FORMAT = "relative";
export declare const DEFAULT_WIDGET_TITLE = "Chat Assistant";
export declare const DEFAULT_USER_SENDER = "Me";
export declare const DEFAULT_BOT_SENDER = "Assistant";
export declare const DEFAULT_ERROR_SENDER = "Error";
export declare const DEFAULT_SYSTEM_SENDER = "System";
export declare const DEFAULT_WIDGET_HEADER_TEMPLATE = "\n<div class=\"chat-widget-header\">\n <span class=\"chat-widget-title-text\">{{widgetTitle}}</span>\n <button class=\"chat-widget-reset-button\">{{resetButton}}</button>\n</div>\n";
export declare const DEFAULT_FLOATING_WIDGET_HEADER_TEMPLATE = "\n<div class=\"chat-widget-header\">\n <span class=\"chat-widget-title-text\">{{widgetTitle}}</span>\n <button class=\"chat-widget-reset-button\">{{resetButton}}</button>\n <button class=\"chat-widget-minimize-button\"><svg viewBox=\"0 0 24 24\" stroke-width=\"2\"><path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M18 12H6\"></path></svg></button>\n</div>\n";
export declare const DEFAULT_MAIN_CONTAINER_TEMPLATE = "\n<div class=\"chat-widget\" style=\"display: flex; flex-direction: column; height: 100%;\">\n <div id=\"chat-widget-header-container\" style=\"flex-shrink: 0;\">\n <!-- Widget header will be injected here -->\n </div>\n <div class=\"chat-messages\" style=\"flex-grow: 1; overflow-y: auto;\">\n <!-- Messages will appear here -->\n </div>\n <div id=\"chat-input-area-container\" style=\"flex-shrink: 0;\"></div>\n</div>\n";
export declare const DEFAULT_INPUT_AREA_TEMPLATE = "\n<div class=\"chat-input-area\">\n <input type=\"text\" class=\"chat-input\" placeholder=\"Type your message...\" />\n <button class=\"send-button\">Send</button>\n</div>\n";
export declare const DEFAULT_MESSAGE_TEMPLATE = "\n<div class=\"{{messageClasses}} message-block\">\n <div class=\"sender-name-display\" style=\"font-size: 0.8em; color: #888; margin-bottom: 2px;\">{{sender}}</div>\n <div class=\"message-bubble\">\n <span class=\"message-text-content\" style=\"white-space: pre-wrap;\">{{message}}</span>\n </div>\n <div class=\"message-datetime\">{{datetime}}</div>\n</div>";
export declare const THINKING_BUBBLE_HTML = "<div class=\"thinking-bubble\"><span class=\"dot\"></span><span class=\"dot\"></span><span class=\"dot\"></span></div>";
export declare const ERROR_MESSAGE_TEMPLATE: (errorMessage: string) => string;