UNPKG

deep-chat

Version:

Customizable chat component for AI APIs

1,262 lines (1,261 loc) 1.39 MB
{ "schemaVersion": "1.0.0", "readme": "", "modules": [ { "kind": "javascript-module", "path": "src/deepChat.ts", "declarations": [ { "kind": "class", "description": "", "name": "DeepChat", "members": [ { "kind": "field", "name": "connect", "type": { "text": "Connect | undefined" } }, { "kind": "field", "name": "directConnection", "type": { "text": "DirectConnection | undefined" } }, { "kind": "field", "name": "webModel", "type": { "text": "WebModel | undefined" } }, { "kind": "field", "name": "requestBodyLimits", "type": { "text": "RequestBodyLimits | undefined" } }, { "kind": "field", "name": "requestInterceptor", "type": { "text": "RequestInterceptor | undefined" } }, { "kind": "field", "name": "responseInterceptor", "type": { "text": "ResponseInterceptor | undefined" } }, { "kind": "field", "name": "validateInput", "type": { "text": "ValidateInput | undefined" } }, { "kind": "field", "name": "loadHistory", "type": { "text": "LoadHistory | undefined" } }, { "kind": "field", "name": "chatStyle", "type": { "text": "CustomStyle | undefined" } }, { "kind": "field", "name": "attachmentContainerStyle", "type": { "text": "CustomStyle | undefined" } }, { "kind": "field", "name": "dropupStyles", "type": { "text": "DropupStyles | undefined" } }, { "kind": "field", "name": "inputAreaStyle", "type": { "text": "CustomStyle | undefined" } }, { "kind": "field", "name": "textInput", "type": { "text": "TextInput | undefined" } }, { "kind": "field", "name": "submitButtonStyles", "type": { "text": "SubmitButtonStyles | undefined" } }, { "kind": "field", "name": "auxiliaryStyle", "type": { "text": "string | undefined" } }, { "kind": "field", "name": "history", "type": { "text": "MessageContent[] | undefined" } }, { "kind": "field", "name": "introMessage", "type": { "text": "IntroMessage | IntroMessage[] | undefined" } }, { "kind": "field", "name": "avatars", "type": { "text": "Avatars | undefined" } }, { "kind": "field", "name": "names", "type": { "text": "Names | undefined" } }, { "kind": "field", "name": "displayLoadingBubble", "type": { "text": "boolean | undefined" } }, { "kind": "field", "name": "errorMessages", "type": { "text": "ErrorMessages | undefined" } }, { "kind": "field", "name": "messageStyles", "type": { "text": "MessageStyles | undefined" } }, { "kind": "field", "name": "textToSpeech", "type": { "text": "boolean | TextToSpeechConfig | undefined" } }, { "kind": "field", "name": "speechToText", "type": { "text": "boolean | SpeechToTextConfig | undefined" } }, { "kind": "field", "name": "images", "type": { "text": "boolean | FilesServiceConfig | undefined" } }, { "kind": "field", "name": "gifs", "type": { "text": "boolean | FilesServiceConfig | undefined" } }, { "kind": "field", "name": "camera", "type": { "text": "boolean | CameraFilesServiceConfig | undefined" } }, { "kind": "field", "name": "audio", "type": { "text": "boolean | FilesServiceConfig | undefined" } }, { "kind": "field", "name": "microphone", "type": { "text": "boolean | MicrophoneFilesServiceConfig | undefined" } }, { "kind": "field", "name": "mixedFiles", "type": { "text": "boolean | FilesServiceConfig | undefined" } }, { "kind": "field", "name": "dragAndDrop", "type": { "text": "boolean | CustomStyle | undefined" } }, { "kind": "field", "name": "introPanelStyle", "type": { "text": "CustomStyle | undefined" } }, { "kind": "field", "name": "htmlClassUtilities", "type": { "text": "HTMLClassUtilities | undefined" } }, { "kind": "field", "name": "remarkable", "type": { "text": "RemarkableOptions | undefined" } }, { "kind": "field", "name": "getMessages", "type": { "text": "() => MessageContent[]" } }, { "kind": "field", "name": "submitUserMessage", "type": { "text": "(content: UserContent) => void" } }, { "kind": "field", "name": "addMessage", "type": { "text": "(message: Response, isUpdate?: boolean) => void" } }, { "kind": "field", "name": "updateMessage", "type": { "text": "(messageBody: MessageBody, index: number) => void" } }, { "kind": "field", "name": "clearMessages", "type": { "text": "(isReset?: boolean) => void" } }, { "kind": "field", "name": "focusInput", "type": { "text": "() => void" } }, { "kind": "field", "name": "refreshMessages", "type": { "text": "() => void" } }, { "kind": "field", "name": "scrollToBottom", "type": { "text": "() => void" } }, { "kind": "field", "name": "disableSubmitButton", "type": { "text": "DisableSubmitButton" } }, { "kind": "field", "name": "setPlaceholderText", "type": { "text": "(text: string) => void" } }, { "kind": "field", "name": "onMessage", "type": { "text": "OnMessage | undefined" } }, { "kind": "field", "name": "onClearMessages", "type": { "text": "() => void | undefined" } }, { "kind": "field", "name": "onComponentRender", "type": { "text": "(ref: DeepChat) => void | undefined" } }, { "kind": "field", "name": "onError", "type": { "text": "OnError | undefined" } }, { "kind": "field", "name": "demo", "type": { "text": "Demo | undefined" } }, { "kind": "field", "name": "_hasBeenRendered", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "_auxiliaryStyleApplied", "type": { "text": "boolean" }, "default": "false" }, { "kind": "field", "name": "_activeService", "type": { "text": "ServiceIO | undefined" } }, { "kind": "field", "name": "_childElement", "type": { "text": "HTMLElement | undefined" } }, { "kind": "field", "name": "_validationHandler", "type": { "text": "ValidationHandler | undefined" } }, { "kind": "field", "name": "_insertKeyViewStyles", "type": { "text": "InsertKeyViewStyles | undefined" } }, { "kind": "field", "name": "_elementRef", "type": { "text": "HTMLElement" }, "privacy": "private", "readonly": true }, { "kind": "method", "name": "changeToChatView", "privacy": "private" }, { "kind": "method", "name": "onRender", "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } }, { "kind": "field", "name": "id", "type": { "text": "string" }, "default": "'container'" }, { "kind": "field", "name": "_waitingToRender_", "type": { "text": "boolean" }, "default": "false", "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } }, { "kind": "field", "name": "_propUpdated_", "type": { "text": "boolean" }, "default": "false", "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } }, { "kind": "field", "name": "_attributes_", "type": { "text": "GenericObject<AttributeTypeConverter>" }, "static": true, "default": "{}", "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } }, { "kind": "field", "name": "_attributeToProperty_", "type": { "text": "GenericObject<string>" }, "static": true, "default": "{}", "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } }, { "kind": "method", "name": "constructPropertyAccessors", "privacy": "private", "parameters": [ { "name": "propertyKey", "type": { "text": "string" } }, { "name": "attributeName", "optional": true, "type": { "text": "string" } } ], "inheritedFrom": { "name": "InternalHTML", "module": "src/utils/webComponent/internalHTML.ts" } } ], "superclass": { "name": "InternalHTML", "module": "/src/utils/webComponent/internalHTML" }, "tagName": "deep-chat", "customElement": true } ], "exports": [ { "kind": "js", "name": "DeepChat", "declaration": { "name": "DeepChat", "module": "src/deepChat.ts" } }, { "kind": "custom-element-definition", "name": "deep-chat", "declaration": { "name": "DeepChat", "module": "src/deepChat.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/audioIcon.ts", "declarations": [ { "kind": "variable", "name": "AUDIO_ICON_STRING", "default": "`<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"-49.49 -49.49 593.87 593.87\" stroke-width=\"3.95908\" transform=\"rotate(0)\">\n <g stroke-width=\"0\"></g>\n <g stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"0.98977\"></g>\n <g>\n <g>\n <g>\n <path d=\"M163.205,76.413v293.301c-3.434-3.058-7.241-5.867-11.486-8.339c-21.38-12.452-49.663-15.298-77.567-7.846 c-49.038,13.096-80.904,54.519-71.038,92.337c4.019,15.404,14.188,28.221,29.404,37.087c13.553,7.894,29.87,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.447-4.087c42.74-11.406,72.411-44.344,72.807-77.654h0.011v-0.162c0.002-0.166,0-0.331,0-0.496V187.072 l290.971-67.3v178.082c-3.433-3.055-7.238-5.863-11.481-8.334c-21.385-12.452-49.654-15.308-77.567-7.846 c-49.038,13.087-80.904,54.519-71.038,92.356c4.019,15.385,14.183,28.212,29.404,37.067c13.548,7.894,29.875,11.933,47.115,11.933 c9.962,0,20.231-1.356,30.452-4.087c42.74-11.413,72.411-44.346,72.804-77.654h0.004v-0.065c0.003-0.236,0.001-0.469,0-0.704V0 L163.205,76.413z M104.999,471.779c-22.543,6.038-45.942,3.846-62.572-5.846c-10.587-6.163-17.591-14.817-20.255-25.038 c-7.144-27.375,18.452-58.029,57.062-68.346c8.409-2.25,16.938-3.346,25.188-3.346c13.87,0,26.962,3.115,37.389,9.192 c10.587,6.163,17.591,14.817,20.255,25.029c0.809,3.102,1.142,6.248,1.139,9.4v0.321h0.014 C162.99,437.714,139.082,462.678,104.999,471.779z M182.898,166.853V92.067l290.971-67.298v74.784L182.898,166.853z M415.677,399.923c-22.558,6.038-45.942,3.837-62.587-5.846c-10.587-6.163-17.587-14.817-20.25-25.019 c-7.144-27.385,18.452-58.058,57.058-68.365c8.414-2.25,16.942-3.346,25.192-3.346c13.875,0,26.962,3.115,37.385,9.192 c10.596,6.163,17.596,14.817,20.26,25.029v0.01c0.796,3.05,1.124,6.144,1.135,9.244v0.468h0.02 C473.668,365.851,449.763,390.814,415.677,399.923z\">\n </path>\n </g>\n </g>\n </g>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "AUDIO_ICON_STRING", "declaration": { "name": "AUDIO_ICON_STRING", "module": "src/icons/audioIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/cameraIcon.ts", "declarations": [ { "kind": "variable", "name": "CAMERA_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "CAMERA_ICON_STRING", "declaration": { "name": "CAMERA_ICON_STRING", "module": "src/icons/cameraIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/captureIcon.ts", "declarations": [ { "kind": "variable", "name": "CAPTURE_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>capture</title>\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "CAPTURE_ICON_STRING", "declaration": { "name": "CAPTURE_ICON_STRING", "module": "src/icons/captureIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/closeIcon.ts", "declarations": [ { "kind": "variable", "name": "CLOSE_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "CLOSE_ICON_STRING", "declaration": { "name": "CLOSE_ICON_STRING", "module": "src/icons/closeIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/fileIcon.ts", "declarations": [ { "kind": "variable", "name": "FILE_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" \n\t viewBox=\"50 30 420 450\" xml:space=\"preserve\">\n<g filter=\"brightness(0) saturate(100%) invert(16%) sepia(0%) saturate(1942%) hue-rotate(215deg) brightness(99%) contrast(93%)\">\n\t<g>\n\t\t<path d=\"M447.933,103.629c-0.034-3.076-1.224-6.09-3.485-8.352L352.683,3.511c-0.004-0.004-0.007-0.005-0.011-0.008\n\t\t\tC350.505,1.338,347.511,0,344.206,0H89.278C75.361,0,64.04,11.32,64.04,25.237v461.525c0,13.916,11.32,25.237,25.237,25.237\n\t\t\th333.444c13.916,0,25.237-11.32,25.237-25.237V103.753C447.96,103.709,447.937,103.672,447.933,103.629z M356.194,40.931\n\t\t\tl50.834,50.834h-49.572c-0.695,0-1.262-0.567-1.262-1.262V40.931z M423.983,486.763c0,0.695-0.566,1.261-1.261,1.261H89.278\n\t\t\tc-0.695,0-1.261-0.566-1.261-1.261V25.237c0-0.695,0.566-1.261,1.261-1.261h242.94v66.527c0,13.916,11.322,25.239,25.239,25.239\n\t\t\th66.527V486.763z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,164.014H149.912c-6.62,0-11.988,5.367-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,169.381,368.707,164.014,362.088,164.014z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,236.353H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.62,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.368,11.988-11.988C374.076,241.721,368.707,236.353,362.088,236.353z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M362.088,308.691H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988h212.175\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C374.076,314.06,368.707,308.691,362.088,308.691z\"/>\n\t</g>\n</g>\n<g>\n\t<g>\n\t\t<path d=\"M256,381.031H149.912c-6.62,0-11.988,5.368-11.988,11.988c0,6.621,5.368,11.988,11.988,11.988H256\n\t\t\tc6.62,0,11.988-5.367,11.988-11.988C267.988,386.398,262.62,381.031,256,381.031z\"/>\n\t</g>\n</g>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "FILE_ICON_STRING", "declaration": { "name": "FILE_ICON_STRING", "module": "src/icons/fileIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/gifIcon.ts", "declarations": [ { "kind": "variable", "name": "GIF_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 5.9266752 5.6408391\" height=\"21.31971\" width=\"22.4\">\n <g>\n <path d=\"m 5.2564627,1.548212 c -3.1136005,-0.4796804 -1.5568006,-0.2398402 0,0 z M 2.0001198,2.0922063 c 0.1556781,0 0.2657489,0.020893 0.3917849,0.080366 0.081154,0.038347 0.1153492,0.134065 0.076377,0.2138602 -0.038973,0.07979 -0.1363527,0.1134129 -0.2175069,0.075091 -0.078199,-0.036919 -0.1407455,-0.048792 -0.250655,-0.048792 -0.2260486,0 -0.3921482,0.2042182 -0.3921482,0.4801409 0,0.2761822 0.1663188,0.4810688 0.3921482,0.4810688 0.1117901,0 0.2064255,-0.046133 0.255659,-0.1284198 l 0.00162,-0.00389 V 3.0534032 l -0.098011,1.75e-4 c -0.081844,0 -0.1495979,-0.059305 -0.1612403,-0.1365887 l -0.00175,-0.023683 c 0,-0.08047 0.060311,-0.1470874 0.1389194,-0.1585331 l 0.024085,-0.00195 h 0.2612303 c 0.081842,0 0.149598,0.059305 0.1612404,0.1365891 l 0.00175,0.023683 -3.398e-4,0.3968809 v 0 l -0.00168,0.014211 v 0 l -0.00553,0.023034 v 0 l -0.00532,0.014145 c -0.098178,0.22826 -0.3236506,0.3528713 -0.5706303,0.3528713 -0.4240855,0 -0.7181621,-0.3622714 -0.7181621,-0.8016063 0,-0.4391857 0.2940275,-0.8006848 0.7181621,-0.8006848 z m 1.2034759,0.031275 c 0.081843,0 0.1495977,0.059305 0.1612403,0.1365891 l 0.00175,0.023683 v 1.2211775 c 0,0.088516 -0.07298,0.1602721 -0.1630073,0.1602721 -0.081841,0 -0.1495972,-0.059305 -0.1612397,-0.1365892 L 3.040589,3.5049308 V 2.2837527 c 0,-0.088516 0.07298,-0.1602721 0.1630067,-0.1602714 z m 0.7813442,0 0.5209469,0.00195 c 0.090025,3.048e-4 0.1627543,0.072306 0.1624458,0.1608234 -2.809e-4,0.08047 -0.06083,0.1468798 -0.1394772,0.158066 l -0.024092,0.00195 -0.3575326,-0.0013 v 0.4497782 l 0.2928918,2.27e-4 c 0.081842,0 0.1495979,0.059305 0.1612403,0.136589 l 0.00175,0.023683 c 0,0.080469 -0.06031,0.1470871 -0.1389193,0.1585393 l -0.024092,0.00195 -0.2928919,-2.336e-4 1.563e-4,0.2860316 c 0,0.080471 -0.06031,0.1470873 -0.1389193,0.1585395 l -0.024085,0.00195 c -0.081843,0 -0.1495979,-0.059305 -0.1612403,-0.1365826 l -0.00175,-0.023691 V 2.2841354 c 2.798e-4,-0.08047 0.060829,-0.1468797 0.1394758,-0.1580594 z\"/>\n <path d=\"m 5.0894191,1.0943261 c 0,-0.21918999 -0.177687,-0.39686999 -0.396876,-0.39686999 h -3.43959 c -0.2191879,0 -0.391262,0.1777519 -0.3968759,0.39686999 l -0.027082,3.4379266 c 0.040152,0.2939927 0.4235456,0.409415 0.4235456,0.409415 l 3.4785583,-0.00851 c 0,0 0.3008506,-0.1402998 0.3236271,-0.4201576 0.042911,-0.5272495 0.034693,-1.6106146 0.034693,-3.4186761 z m -4.49792494,0 c 0,-0.36530999 0.29614504,-0.66145999 0.66145894,-0.66145999 h 3.43959 c 0.365314,0 0.66146,0.29615 0.66146,0.66145999 v 3.43959 c 0,0.36532 -0.296146,0.66146 -0.66146,0.66146 h -3.43959 c -0.3653139,0 -0.66145894,-0.29614 -0.66145894,-0.66146 z\"/>\n </g>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "GIF_ICON_STRING", "declaration": { "name": "GIF_ICON_STRING", "module": "src/icons/gifIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/imageIcon.ts", "declarations": [ { "kind": "variable", "name": "IMAGE_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M20,15.2928932 L20,5.5 C20,4.67157288 19.3284271,4 18.5,4 L5.5,4 C4.67157288,4 4,4.67157288 4,5.5 L4,12.2928932 L7.14644661,9.14644661 C7.34170876,8.95118446 7.65829124,8.95118446 7.85355339,9.14644661 L13.5,14.7928932 L16.1464466,12.1464466 C16.3417088,11.9511845 16.6582912,11.9511845 16.8535534,12.1464466 L20,15.2928932 Z M20,16.7071068 L16.5,13.2071068 L13.8535534,15.8535534 C13.6582912,16.0488155 13.3417088,16.0488155 13.1464466,15.8535534 L7.5,10.2071068 L4,13.7071068 L4,18.5 C4,19.3284271 4.67157288,20 5.5,20 L18.5,20 C19.3284271,20 20,19.3284271 20,18.5 L20,16.7071068 Z M3,5.5 C3,4.11928813 4.11928813,3 5.5,3 L18.5,3 C19.8807119,3 21,4.11928813 21,5.5 L21,18.5 C21,19.8807119 19.8807119,21 18.5,21 L5.5,21 C4.11928813,21 3,19.8807119 3,18.5 L3,5.5 Z M15,6 L17,6 C17.5522847,6 18,6.44771525 18,7 L18,9 C18,9.55228475 17.5522847,10 17,10 L15,10 C14.4477153,10 14,9.55228475 14,9 L14,7 C14,6.44771525 14.4477153,6 15,6 Z M15,7 L15,9 L17,9 L17,7 L15,7 Z\"/>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "IMAGE_ICON_STRING", "declaration": { "name": "IMAGE_ICON_STRING", "module": "src/icons/imageIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/microphone.ts", "declarations": [ { "kind": "variable", "name": "MICROPHONE_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\" width=\"1.4em\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\t viewBox=\"0 0 490.9 490.9\" xml:space=\"preserve\">\n\t<g>\n\t\t<g>\n\t\t\t<path d=\"M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5\n\t\t\t\tC149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5\n\t\t\t\tc0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z\"/>\n\t\t\t<path d=\"M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3\n\t\t\t\ts5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8\n\t\t\t\tc0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9\n\t\t\t\tC106.6,220,101.2,214.5,94.4,214.5z\"/>\n\t\t</g>\n\t</g>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "MICROPHONE_ICON_STRING", "declaration": { "name": "MICROPHONE_ICON_STRING", "module": "src/icons/microphone.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/mixedFilesIcon.ts", "declarations": [ { "kind": "variable", "name": "MIXED_FILES_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>file</title>\n<path d=\"M20 10.9696L11.9628 18.5497C10.9782 19.4783 9.64274 20 8.25028 20C6.85782 20 5.52239 19.4783 4.53777 18.5497C3.55315 17.6211 3 16.3616 3 15.0483C3 13.7351 3.55315 12.4756 4.53777 11.547L12.575 3.96687C13.2314 3.34779 14.1217 3 15.05 3C15.9783 3 16.8686 3.34779 17.525 3.96687C18.1814 4.58595 18.5502 5.4256 18.5502 6.30111C18.5502 7.17662 18.1814 8.01628 17.525 8.63535L9.47904 16.2154C9.15083 16.525 8.70569 16.6989 8.24154 16.6989C7.77738 16.6989 7.33224 16.525 7.00403 16.2154C6.67583 15.9059 6.49144 15.4861 6.49144 15.0483C6.49144 14.6106 6.67583 14.1907 7.00403 13.8812L14.429 6.88674\" stroke=\"#000000\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "MIXED_FILES_ICON_STRING", "declaration": { "name": "MIXED_FILES_ICON_STRING", "module": "src/icons/mixedFilesIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/notVisibilityIcon.ts", "declarations": [ { "kind": "variable", "name": "NOT_VISIBLE_ICON_STRING", "default": "`<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "NOT_VISIBLE_ICON_STRING", "declaration": { "name": "NOT_VISIBLE_ICON_STRING", "module": "src/icons/notVisibilityIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/playIcon.ts", "declarations": [ { "kind": "variable", "name": "PLAY_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "PLAY_ICON_STRING", "declaration": { "name": "PLAY_ICON_STRING", "module": "src/icons/playIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/plusIcon.ts", "declarations": [ { "kind": "variable", "name": "PLUS_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16 0c-8.836 0-16 7.163-16 16s7.163 16 16 16c8.837 0 16-7.163 16-16s-7.163-16-16-16zM16 30.032c-7.72 0-14-6.312-14-14.032s6.28-14 14-14 14 6.28 14 14-6.28 14.032-14 14.032zM23 15h-6v-6c0-0.552-0.448-1-1-1s-1 0.448-1 1v6h-6c-0.552 0-1 0.448-1 1s0.448 1 1 1h6v6c0 0.552 0.448 1 1 1s1-0.448 1-1v-6h6c0.552 0 1-0.448 1-1s-0.448-1-1-1z\"></path>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "PLUS_ICON_STRING", "declaration": { "name": "PLUS_ICON_STRING", "module": "src/icons/plusIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/refreshIcon.ts", "declarations": [ { "kind": "variable", "name": "REFRESH_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M27.1 14.313V5.396L24.158 8.34c-2.33-2.325-5.033-3.503-8.11-3.503C9.902 4.837 4.901 9.847 4.899 16c.001 6.152 5.003 11.158 11.15 11.16 4.276 0 9.369-2.227 10.836-8.478l.028-.122h-3.23l-.022.068c-1.078 3.242-4.138 5.421-7.613 5.421a8 8 0 0 1-5.691-2.359A7.993 7.993 0 0 1 8 16.001c0-4.438 3.611-8.049 8.05-8.049 2.069 0 3.638.58 5.924 2.573l-3.792 3.789H27.1z\"/>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "REFRESH_ICON_STRING", "declaration": { "name": "REFRESH_ICON_STRING", "module": "src/icons/refreshIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/stopIcon.ts", "declarations": [ { "kind": "variable", "name": "STOP_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "STOP_ICON_STRING", "declaration": { "name": "STOP_ICON_STRING", "module": "src/icons/stopIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/submitIcon.ts", "declarations": [ { "kind": "variable", "name": "SUBMIT_ICON_STRING", "default": "`<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "SUBMIT_ICON_STRING", "declaration": { "name": "SUBMIT_ICON_STRING", "module": "src/icons/submitIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/tickIcon.ts", "declarations": [ { "kind": "variable", "name": "TICK_ICON_STRING", "default": "`<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>`" } ], "exports": [ { "kind": "js", "name": "TICK_ICON_STRING", "declaration": { "name": "TICK_ICON_STRING", "module": "src/icons/tickIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/icons/visibleIcon.ts", "declarations": [ { "kind": "variable", "name": "VISIBLE_ICON_STRING", "default": "`<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n`" } ], "exports": [ { "kind": "js", "name": "VISIBLE_ICON_STRING", "declaration": { "name": "VISIBLE_ICON_STRING", "module": "src/icons/visibleIcon.ts" } } ] }, { "kind": "javascript-module", "path": "src/services/serviceIO.ts", "declarations": [], "exports": [] }, { "kind": "javascript-module", "path": "src/services/serviceIOFactory.ts", "declarations": [ { "kind": "class", "description": "", "name": "ServiceIOFactory", "members": [ { "kind": "method", "name": "create", "privacy": "public", "static": true, "return": { "type": { "text": "ServiceIO" } }, "parameters": [ { "name": "deepChat", "type": { "text": "DeepChat" } } ] } ] } ], "exports": [ { "kind": "js", "name": "ServiceIOFactory", "declaration": { "name": "ServiceIOFactory", "module": "src/services/serviceIOFactory.ts" } } ] }, { "kind": "javascript-module", "path": "src/webModel/webModel.ts", "declarations": [ { "kind": "class", "description": "", "name": "WebModel", "members": [ { "kind": "field", "name": "chat", "type": { "text": "WebLLM.ChatInterface | undefined" }, "privacy": "public", "static": true }, { "kind": "field", "name": "GENERIC_ERROR", "privacy": "private", "static": true, "readonly": true }, { "kind": "field", "name": "MULTIPLE_MODELS_ERROR", "type": { "text": "string" }, "privacy": "private", "static": true, "readonly": true, "default": "'Cannot run multiple web models'" }, { "kind": "field", "name": "WEB_LLM_NOT_FOUND_ERROR", "type": { "text": "string" }, "privacy": "private", "static": true, "readonly": true, "default": "'WebLLM module not found'" }, { "kind": "field", "name": "DEFAULT_MODEL", "type": { "text": "string" }, "privacy": "private", "static": true, "readonly": true, "default": "'Llama-2-7b-chat-hf-q4f32_1'" }, { "kind": "field", "name": "MODULE_SEARCH_LIMIT_S", "type": { "text": "number" }, "privacy": "public", "static": true, "readonly": true, "default": "5" }, { "kind": "field", "name": "_isModelLoaded", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "_isModelLoading", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "_loadOnFirstMessage", "type": { "text": "boolean" }, "privacy": "private", "default": "false" }, { "kind": "field", "name": "_webModel", "type": { "text": "WebModelConfig" }, "privacy": "private", "readonly": true, "default": "{}" }, { "kind": "field", "name": "permittedErrorPrefixes", "type": { "text": "array" }, "default": "[WebModel.MULTIPLE_MODELS_ERROR, WebModel.WEB_LLM_NOT_FOUND_ERROR, WebModel.GENERIC_ERROR]" }, { "kind": "field", "name": "_conversationHistory", "type": { "text": "Array<[string, string]>" }, "privacy": "private", "readonly": true, "default": "[]" }, { "kind": "field", "name": "_chatEl", "type": { "text": "HTMLElement | undefined" }, "privacy": "private", "readonly": true, "default": "deepChat.shadowRoot?.children[0]" }, { "kind": "field", "name": "_removeIntro", "type": { "text": "() => void | undefined" }, "privacy": "private" }, { "kind": "field", "name": "_messages", "type": { "text": "Messages | undefined" }, "privacy": "private" }, { "kind": "method", "name": "setUpMessages", "privacy": "public", "parameters": [ { "name": "messages", "type": { "text": "Messages" } } ] }, { "kind": "method", "name": "setUpHistory", "privacy": "private", "static": true, "parameters": [ { "name": "conversationHistory", "type": { "text": "Array<[string, string]>" } }, { "name": "history", "type": { "text": "MessageContent[]" } } ] }, { "kind": "method", "name": "findModelInWindow", "privacy": "private", "parameters": [ { "name": "deepChat", "type": { "text": "DeepChat" } }, { "name": "seconds", "default": "0" } ] }, { "kind": "method", "name": "shouldAddIntroMessage", "privacy": "private", "parameters": [ { "name": "customIntroMessage", "optional": true, "type": { "text": "IntroMessage | IntroMessage[]" } } ] }, { "kind": "method", "name": "scrollToTop", "privacy": "private", "parameters": [ { "name": "timeoutMS", "optional": true, "type": { "text": "number" } } ] }, { "kind": "method", "name": "getIntroMessage", "privacy": "public", "parameters": [ { "name": "customIntroMessage", "optional": true, "type": { "text": "IntroMessage" } } ] }, { "kind": "method", "name": "configureInit", "privacy": "private", "parameters": [ { "name": "wasIntroSet", "type": { "text": "boolean" } } ] }, { "kind": "method", "name": "init", "privacy": "private", "parameters": [ { "name": "files", "optional": true, "type": { "text": "FileList" } } ] }, { "kind": "method", "name": "attemptToCreateChat", "privacy": "private" }, { "kind": "method", "name": "getConfig", "privacy": "private" }, { "kind": "method", "name": "loadModel", "privacy": "private", "parameters": [ { "name": "chat", "type": { "text": "WebLLM.ChatInterface" } }, { "name": "files", "optional": true, "type": { "text": "FileList" } } ] }, { "kind": "method", "name": "unloadChat", "privacy": "private", "parameters": [ { "name": "err", "type": { "text": "string" } } ] }, { "kind": "method", "name": "immediateResp", "privacy": "private", "parameters": [ { "name": "messages", "type": { "text": "Messages" } }, {