diff --git a/configs/config.yaml b/configs/config.yaml
index c0d554f5..1d4e4b88 100644
--- a/configs/config.yaml
+++ b/configs/config.yaml
@@ -1,5 +1,5 @@
# =================== Lord Of Large Language Multimodal Systems Configuration file ===========================
-version: 92
+version: 93
binding_name: null
model_name: null
model_variant: null
@@ -80,6 +80,10 @@ auto_show_browser: true
# copy to clipboard
copy_to_clipboard_add_all_details: false
+# STT service
+asr_enable: false
+asr_base_url: http://localhost:9000
+
# Voice service
xtts_enable: false
xtts_base_url: http://localhost:8020
diff --git a/docs/custom_personality_docs/README.md b/docs/custom_personality_docs/README.md
new file mode 100644
index 00000000..a783148c
--- /dev/null
+++ b/docs/custom_personality_docs/README.md
@@ -0,0 +1,188 @@
+# Scripted personalities building documentation
+
+This documentation was written by lollms after reading its own code with the help of ParisNeo.
+
+## Introduction to LoLLMs and APScript Integration
+
+Welcome to the integration guide for LoLLMs (Lord of Large Language Multimodal Systems) and APScript, designed for developers ready to advance the capabilities of AI in their projects. Created by ParisNeo, LoLLMs sets a new standard in AI development, emphasizing the creation of AI entities that go beyond traditional functionalities to become dynamic partners in various applications.
+
+This documentation aims to provide a concise yet comprehensive overview for developers to effectively integrate the innovative features of APScript with the foundational principles of LoLLMs. Whether your focus is on robotics, digital assistance, or any area where AI can contribute significantly, this guide is your starting point for developing AI personalities that are both technically sophisticated and practically impactful.
+
+The journey with LoLLMs and APScript is about pushing the limits of AI to enhance both the digital and physical realms. As we explore the integration and application of scripted personalities, we invite developers to contribute to this evolving field, shaping the future of AI together.
+
+Let's embark on this journey to unlock the full potential of your AI projects, making AI not just a tool, but a transformative force in your work. Welcome to the next step in AI development with LoLLMs and APScript.
+
+## Lollms architecture as viewed from personality perspective
+The comprehensive architecture of the LoLLMs (Lord of Large Language Multimodal Systems) as envisioned by ParisNeo encompasses a sophisticated integration of multiple subsystems, each designed to fulfill specific roles within the broader framework of AI-driven interactions and functionalities. The system's architecture is centered around enhancing user interactions through the implementation of a dynamic and personality-infused interface, supported by advanced data management techniques and modular utilities. Below is a detailed description of the architecture's components and their interactions:
+
+
+
+
+
+
+## Core Components
+
+- **LLM Core**: At the heart of the system lies the LLM Core, responsible for the execution of tasks and the generation of responses. This component processes inputs refined by the Context Management subsystem and generates outputs that are informed by the system's personality and the contextual information at hand.
+
+- **Personality Interface**: This crucial interface manages the interactions between the user and the LLM Core, ensuring that inputs are refined for optimal processing and that the generated responses are aligned with the system's personality traits. It plays a pivotal role in maintaining the coherence and relevance of conversations. Additionally, it exposes utilities to the personality module (APScript), allowing for a more nuanced and sophisticated application of the system's personality.
+
+- **Context Management**: This subsystem prepares the context input for the LLM Core, ensuring that the information is optimally structured. It also updates the context based on ongoing discussions, leveraging both Medium-Term and Long-Term Memory to maintain conversational coherence and relevance.
+
+- **Data Management Techniques**: Incorporating strategies such as Retrieval-Augmented Generation (RAG) and Summarization, this component fuses data from various sources, including the system's Long-Term Memory and Supplementary Information, to enrich the context and content of responses.
+
+- **Medium-Term Memory**: Represents the specific conversation representation, holding information that is pertinent to the ongoing interaction, thus enabling the system to maintain a thread of continuity throughout the conversation.
+
+- **Long-Term Memory**: Acts as the system's skills library, storing a wide array of information and skills that the system can query to enhance its responses and actions.
+
+- **Supplementary Information**: This component integrates internet data and other external sources of information, providing a layer of real-time relevance and updating the context management subsystem with fresh data as necessary.
+
+- **Utilities**: A collection of modular functions that the system can leverage for various tasks, ranging from executing commands to interfacing with other peripherals. The Personality Interface coordinates and exposes these utilities, allowing the APScript to utilize them directly for a more dynamic interaction capability.
+
+- **Other Peripherals**: Represents interaction devices and external systems that the LoLLMs can interface with, extending its functionality and interaction capabilities beyond traditional inputs and outputs.
+
+### Supportive Components
+
+- **APScript**: The personality module that defines the strategic data management and personality traits of the system. It consults with the Personality Interface for persona guidance and leverages the Utilities subsystem to enrich interactions with personality-driven decisions.
+
+- **Documentation**: Serves as the permanent storage for the system, queried by the Data Management subsystem for retrieving stored knowledge, guidelines, and procedural information, ensuring that the system's operations are well-documented and easily accessible.
+
+### User Interaction
+
+The user initiates interactions by generating prompts that are directed to the Personality Interface. This interface refines the prompts and manages the flow of information between the user, the Context Management subsystem, and the LLM Core, ensuring that the system's responses are not only accurate and contextually relevant but also infused with the system's defined personality. The APScript's ability to directly utilize the Utilities subsystem further enhances the system's capability to deliver engaging, sophisticated, and personality-consistent interactions.
+
+This architecture represents a holistic approach to AI-driven interactions, emphasizing the importance of personality in user engagement, the seamless integration of data management techniques, and the flexible utilization of utilities to support and enhance the system's capabilities.
+
+# How to build your own scripted personality?
+
+
+### Configuration Types
+
+1. **String**: A single line of text.
+ - **Usage**: For short, simple text inputs like names, single commands, or options.
+ - **Example**: `{"name":"personality_name", "type":"string", "value":"default_name", "help":"The name of the personality."}`
+
+2. **Text**: Multiline text.
+ - **Usage**: For longer inputs that may include descriptions, multiple commands, or any extensive text.
+ - **Example**: `{"name":"description", "type":"text", "value":"default_description", "help":"Detailed description of the personality."}`
+
+3. **Int**: Integer values.
+ - **Usage**: For numerical inputs without decimals. Ideal for counts, thresholds, or any parameter that requires whole numbers.
+ - **Example**: `{"name":"max_attempts", "type":"int", "value":5, "help":"Maximum number of attempts allowed."}`
+
+4. **Float**: Floating-point numbers.
+ - **Usage**: For numerical inputs with decimals. Useful for thresholds, percentages, or parameters that require precision.
+ - **Example**: `{"name":"threshold", "type":"float", "value":0.75, "help":"Threshold value for activating a feature."}`
+
+5. **Bool**: Boolean (True/False).
+ - **Usage**: For toggleable features or options that can be either on or off.
+ - **Example**: `{"name":"enable_feature", "type":"bool", "value":False, "help":"Enables or disables a specific feature."}`
+
+6. **List**: A list of items.
+ - **Usage**: When you need to store multiple values in an ordered manner. Each item in the list can be of the same type.
+ - **Example**: `{"name":"keywords", "type":"list", "value":["AI", "robotics", "science"], "help":"List of keywords related to the personality."}`
+
+7. **Dict**: A dictionary (key-value pairs).
+ - **Usage**: For more complex configurations where each item has a unique identifier (key) and an associated value.
+ - **Example**: `{"name":"parameters", "type":"dict", "value":{"param1": "value1", "param2": "value2"}, "help":"Dictionary of parameters and their values."}`
+
+8. **Btn (Button)**: A trigger for special actions.
+ - **Usage**: For actions that require user initiation, like resetting settings, starting a process, or any other interactive command.
+ - **Example**: Not applicable in the same way as other types since it's more about interaction than storing a value. It would be implemented in the UI rather than as a configuration entry.
+
+### Options for Configuration Entries
+
+For configurations that require users to choose from predefined options, you can add an `options` entry. This is particularly useful with `string` types to limit the input to a set of valid choices.
+
+- **Example (String with Options)**: `{"name":"response_mode", "type":"string", "options":["verbose", "concise"], "value":"concise", "help":"Determines the verbosity of AI responses."}`
+
+## Base Functionalities
+
+The APScript framework provides a set of base functionalities designed to enhance interaction with users and streamline the development of workflows. These methods allow for dynamic message construction, step-by-step process updates, transient notifications, and the initiation of new conversation threads. Below is an overview of these core methods and their intended uses.
+
+### Full Message (`full`)
+
+```markdown
+full(text: str)
+
+Writes text in a full message to the user inside a description. This method replaces any existing content in the message description with the specified text.
+
+Example Usage:
+self.full("Here is a complete overview of your request.")
+```
+
+### Append Chunk (`chunk`)
+
+```markdown
+chunk(text: str)
+
+Appends a new string to the existing message. It's useful for adding more information to the current message incrementally.
+
+Example Usage:
+self.chunk("Adding additional details...")
+```
+
+### Step Start (`step_start`)
+
+```markdown
+step_start(description: str)
+
+Marks the beginning of a new step in the process, informing the user that a new operational step has started.
+
+Example Usage:
+self.step_start("Commencing data analysis...")
+```
+
+### Step End (`step_end`)
+
+```markdown
+step_end(description: str, status: bool = True)
+
+Marks the end of a step in the process, indicating whether it was successful.
+
+Example Usage:
+self.step_end("Data analysis completed.", status=True)
+```
+
+### Error Notification (`error`)
+
+```markdown
+error(text: str)
+
+Sends an error toast message to the user for immediate error notification. The message is transient and does not persist in the message description.
+
+Example Usage:
+self.error("Failed to process the requested data.")
+```
+
+### Information Notification (`info`)
+
+```markdown
+info(text: str)
+
+Sends an information toast message to the user for quick, non-critical notifications. These messages are transient.
+
+Example Usage:
+self.info("Your request is being processed.")
+```
+
+### New Message (`new_message`)
+
+```markdown
+new_message(text: str = "")
+
+Creates a new message in the discussion, useful for initiating a new message separate from the current conversation flow.
+
+Example Usage:
+self.new_message("Starting a new topic of discussion...")
+```
+
+### Instantaneous Step Information (`step`)
+
+```markdown
+step(info: str)
+
+Specifies some instantaneous information during the execution of the workflow. This method is ideal for conveying quick updates or notices that occur between longer steps or processes.
+
+Example Usage:
+self.step("Quick status update: intermediate data validated.")
+```
\ No newline at end of file
diff --git a/docs/custom_personality_docs/architecture.png b/docs/custom_personality_docs/architecture.png
new file mode 100644
index 00000000..21190c3f
Binary files /dev/null and b/docs/custom_personality_docs/architecture.png differ
diff --git a/docs/youtube/TUTORIAL PROJECT/tutorial project.md b/docs/youtube/TUTORIAL PROJECT/tutorial project.md
new file mode 100644
index 00000000..c4b3d89b
--- /dev/null
+++ b/docs/youtube/TUTORIAL PROJECT/tutorial project.md
@@ -0,0 +1,17 @@
+Objective: Finally build a tutorial on how to use lollms. This is a very searched thing so we need to neil the video.
+We don't show how to download and install the tool as this was already been covered by previous
+We will show:
+1- basic usage :
+1.1 discussions left panel which is composed of a top toolbar and a list of discussions and at the bottom of the panel, threre is the name of the current discussions database (we can change databases, export them, share them, etc):
+- create a new discussion (press + from the panel toolbox) this will add a new discussion to the list with the name New discussion and we are welcomed by the current personality welcome message.
+- select discussions by pressing the check button from the toolbox which will show a checkbox in front of each entry in the list of discussions. We can select one , multiple or press the toggle select all. Once selected, we can export it as json, as a zip folder, or as a markdown.
+-delete the database
+-import discussions from a json file
+-search discussions by name
+- Add discussion to skills library which reads through the discussion and extracts all important information that can be valuable for long term preservation
+- activate skills library usage in LLM (that allows the AI to use RAG on the skills library)
+-
+
+
+interacting with AI, interacting with AI using the web enabled mode, using audio input, sending a file for rag, taking a shot with the webcam, adding a link to a webpage, creating a complex prompt while using markdown options on message ui that allow to create different kind of code tags, creating AI response (useful to train ai by building a database), forcing the AI to start answering in a specific manner to make it more aligned.
+- edit message contents, copy message content, , change AI message content (useful for training), add thumb up and thumbdown to AI outputs,
\ No newline at end of file
diff --git a/lollms_core b/lollms_core
index 8ca192ea..835d85ce 160000
--- a/lollms_core
+++ b/lollms_core
@@ -1 +1 @@
-Subproject commit 8ca192ea648bf111c6ba75d1a8a0c96f5ce26805
+Subproject commit 835d85ce7bb7fd300f8057afc75bc71c9b24ff61
diff --git a/web/dist/assets/index-2199349a.js b/web/dist/assets/index-97280c74.js
similarity index 99%
rename from web/dist/assets/index-2199349a.js
rename to web/dist/assets/index-97280c74.js
index e990c1bc..cbab7691 100644
--- a/web/dist/assets/index-2199349a.js
+++ b/web/dist/assets/index-97280c74.js
@@ -179,7 +179,7 @@ If You are using windows, this will install wsl so you need to activate it.
Here is how you can do that`))},Ppt)])]),d("tr",null,[Upt,d("td",null,[d("div",Fpt,[d("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[215]||(e[215]=(...h)=>r.reinstallPetalsService&&r.reinstallPetalsService(...h))},"install petals service")])])]),d("tr",null,[Bpt,d("td",null,[d("div",Gpt,[ee(d("input",{type:"text",id:"petals_base_url",required:"","onUpdate:modelValue":e[216]||(e[216]=h=>r.configFile.petals_base_url=h),onChange:e[217]||(e[217]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.petals_base_url]])])])])])]),_:1}),Ie(o,{title:"Elastic search Service (under construction)",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[d("table",Vpt,[d("tr",null,[zpt,d("td",null,[d("div",Hpt,[ee(d("input",{type:"checkbox",id:"elastic_search_service",required:"","onUpdate:modelValue":e[218]||(e[218]=h=>r.configFile.elastic_search_service=h),onChange:e[219]||(e[219]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[it,r.configFile.elastic_search_service]])])])]),d("tr",null,[qpt,d("td",null,[d("div",Ypt,[d("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[220]||(e[220]=(...h)=>r.reinstallElasticSearchService&&r.reinstallElasticSearchService(...h))},"install ElasticSearch service")])])]),d("tr",null,[$pt,d("td",null,[d("div",Wpt,[ee(d("input",{type:"text",id:"elastic_search_url",required:"","onUpdate:modelValue":e[221]||(e[221]=h=>r.configFile.elastic_search_url=h),onChange:e[222]||(e[222]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.elastic_search_url]])])])])])]),_:1}),Ie(o,{title:"XTTS service",is_subcard:!0,class:"pb-2 m-2"},{default:Je(()=>[d("table",Kpt,[d("tr",null,[jpt,d("td",null,[d("div",Qpt,[ee(d("input",{type:"checkbox",id:"xtts_enable",required:"","onUpdate:modelValue":e[223]||(e[223]=h=>r.configFile.xtts_enable=h),onChange:e[224]||(e[224]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[it,r.configFile.xtts_enable]])])])]),d("tr",null,[Xpt,d("td",null,[d("div",Zpt,[d("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[225]||(e[225]=(...h)=>r.reinstallAudioService&&r.reinstallAudioService(...h))},"install xtts service"),d("button",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",onClick:e[226]||(e[226]=(...h)=>r.startAudioService&&r.startAudioService(...h))},"start xtts service"),d("a",{class:"hover:text-primary bg-green-200 rounded-lg p-4 m-4 w-full text-center items-center",href:this.$store.state.config.xtts_base_url+"/docs",target:"_blank"},"show xtts service entries",8,Jpt),e_t])])]),d("tr",null,[t_t,d("td",null,[d("div",n_t,[ee(d("input",{type:"text",id:"xtts_base_url",required:"","onUpdate:modelValue":e[227]||(e[227]=h=>r.configFile.xtts_base_url=h),onChange:e[228]||(e[228]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_base_url]])])])]),d("tr",null,[i_t,d("td",null,[d("div",s_t,[ee(d("select",{"onUpdate:modelValue":e[229]||(e[229]=h=>r.xtts_current_language=h),onChange:e[230]||(e[230]=h=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),I($e,null,ct(s.voice_languages,(h,E)=>(A(),I("option",{key:E,value:h},fe(E),9,o_t))),128))],40,r_t),[[Vn,r.xtts_current_language]])])])]),d("tr",null,[a_t,d("td",null,[d("div",l_t,[ee(d("select",{"onUpdate:modelValue":e[231]||(e[231]=h=>r.xtts_current_voice=h),onChange:e[232]||(e[232]=h=>s.settingsChanged=!0),disabled:!r.xtts_enable},[(A(!0),I($e,null,ct(s.voices,h=>(A(),I("option",{key:h,value:h},fe(h),9,d_t))),128))],40,c_t),[[Vn,r.xtts_current_voice]])])])]),d("tr",null,[u_t,d("td",null,[d("div",p_t,[ee(d("input",{type:"checkbox",id:"xtts_use_deepspeed",required:"","onUpdate:modelValue":e[233]||(e[233]=h=>r.configFile.xtts_use_deepspeed=h),onChange:e[234]||(e[234]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,__t),[[it,r.configFile.xtts_use_deepspeed]])])])]),d("tr",null,[h_t,d("td",null,[d("div",f_t,[ee(d("input",{type:"checkbox",id:"xtts_use_streaming_mode",required:"","onUpdate:modelValue":e[235]||(e[235]=h=>r.configFile.xtts_use_streaming_mode=h),onChange:e[236]||(e[236]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,m_t),[[it,r.configFile.xtts_use_streaming_mode]])])])]),d("tr",null,[g_t,d("td",null,[d("div",b_t,[ee(d("input",{type:"checkbox",id:"auto_read",required:"","onUpdate:modelValue":e[237]||(e[237]=h=>r.configFile.auto_read=h),onChange:e[238]||(e[238]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",disabled:!r.xtts_enable},null,40,E_t),[[it,r.configFile.auto_read]])])])]),d("tr",null,[v_t,d("td",null,[d("div",y_t,[ee(d("input",{type:"text",id:"xtts_stream_chunk_size",required:"","onUpdate:modelValue":e[239]||(e[239]=h=>r.configFile.xtts_stream_chunk_size=h),onChange:e[240]||(e[240]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_stream_chunk_size]])])])]),d("tr",null,[S_t,d("td",null,[d("div",T_t,[ee(d("input",{type:"number",id:"xtts_temperature",required:"","onUpdate:modelValue":e[241]||(e[241]=h=>r.configFile.xtts_temperature=h),onChange:e[242]||(e[242]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.01"},null,544),[[Pe,r.configFile.xtts_temperature,void 0,{number:!0}]])])])]),d("tr",null,[x_t,d("td",null,[d("div",C_t,[ee(d("input",{type:"number",id:"xtts_length_penalty",required:"","onUpdate:modelValue":e[243]||(e[243]=h=>r.configFile.xtts_length_penalty=h),onChange:e[244]||(e[244]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Pe,r.configFile.xtts_length_penalty,void 0,{number:!0}]])])])]),d("tr",null,[R_t,d("td",null,[d("div",w_t,[ee(d("input",{type:"number",id:"xtts_repetition_penalty",required:"","onUpdate:modelValue":e[245]||(e[245]=h=>r.configFile.xtts_repetition_penalty=h),onChange:e[246]||(e[246]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Pe,r.configFile.xtts_repetition_penalty,void 0,{number:!0}]])])])]),d("tr",null,[A_t,d("td",null,[d("div",N_t,[ee(d("input",{type:"number",id:"xtts_top_k",required:"","onUpdate:modelValue":e[247]||(e[247]=h=>r.configFile.xtts_top_k=h),onChange:e[248]||(e[248]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_top_k,void 0,{number:!0}]])])])]),d("tr",null,[O_t,d("td",null,[d("div",I_t,[ee(d("input",{type:"number",id:"xtts_top_p",required:"","onUpdate:modelValue":e[249]||(e[249]=h=>r.configFile.xtts_top_p=h),onChange:e[250]||(e[250]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[Pe,r.configFile.xtts_top_p,void 0,{number:!0}]])])])]),d("tr",null,[M_t,d("td",null,[d("div",D_t,[ee(d("input",{type:"number",id:"xtts_speed",required:"","onUpdate:modelValue":e[251]||(e[251]=h=>r.configFile.xtts_speed=h),onChange:e[252]||(e[252]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600",step:"0.1"},null,544),[[Pe,r.configFile.xtts_speed,void 0,{number:!0}]])])])]),d("tr",null,[k_t,d("td",null,[d("div",L_t,[ee(d("input",{type:"checkbox",id:"enable_text_splitting","onUpdate:modelValue":e[253]||(e[253]=h=>r.configFile.enable_text_splitting=h),onChange:e[254]||(e[254]=h=>s.settingsChanged=!0),class:"mt-1 px-2 py-1 border border-gray-300 rounded dark:bg-gray-600"},null,544),[[it,r.configFile.enable_text_splitting]])])])])])]),_:1})],2)]),d("div",P_t,[d("div",U_t,[d("button",{onClick:e[255]||(e[255]=ye(h=>s.bzc_collapsed=!s.bzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex flex-row items-center"},[ee(d("div",null,B_t,512),[[Ot,s.bzc_collapsed]]),ee(d("div",null,V_t,512),[[Ot,!s.bzc_collapsed]]),z_t,r.configFile.binding_name?H("",!0):(A(),I("div",H_t,[q_t,je(" No binding selected! ")])),r.configFile.binding_name?(A(),I("div",Y_t,"|")):H("",!0),r.configFile.binding_name?(A(),I("div",$_t,[d("div",W_t,[d("img",{src:r.imgBinding,class:"w-8 h-8 rounded-full object-fill text-blue-700"},null,8,K_t),d("h3",j_t,fe(r.binding_name),1)])])):H("",!0)])]),d("div",{class:Ve([{hidden:s.bzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[r.bindingsZoo&&r.bindingsZoo.length>0?(A(),I("div",Q_t,[d("label",X_t," Bindings: ("+fe(r.bindingsZoo.length)+") ",1),d("div",{class:Ve(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.bzl_collapsed?"":"max-h-96"])},[Ie(os,{name:"list"},{default:Je(()=>[(A(!0),I($e,null,ct(r.bindingsZoo,(h,E)=>(A(),xt(a,{ref_for:!0,ref:"bindingZoo",key:"index-"+E+"-"+h.folder,binding:h,"on-selected":r.onBindingSelected,"on-reinstall":r.onReinstallBinding,"on-unInstall":r.onUnInstallBinding,"on-install":r.onInstallBinding,"on-settings":r.onSettingsBinding,"on-reload-binding":r.onReloadBinding,selected:h.folder===r.configFile.binding_name},null,8,["binding","on-selected","on-reinstall","on-unInstall","on-install","on-settings","on-reload-binding","selected"]))),128))]),_:1})],2)])):H("",!0),s.bzl_collapsed?(A(),I("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[256]||(e[256]=h=>s.bzl_collapsed=!s.bzl_collapsed)},J_t)):(A(),I("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[257]||(e[257]=h=>s.bzl_collapsed=!s.bzl_collapsed)},tht))],2)]),d("div",nht,[d("div",iht,[d("button",{onClick:e[258]||(e[258]=ye(h=>r.modelsZooToggleCollapse(),["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ee(d("div",null,rht,512),[[Ot,s.mzc_collapsed]]),ee(d("div",null,aht,512),[[Ot,!s.mzc_collapsed]]),lht,d("div",cht,[r.configFile.binding_name?H("",!0):(A(),I("div",dht,[uht,je(" Select binding first! ")])),!r.configFile.model_name&&r.configFile.binding_name?(A(),I("div",pht,[_ht,je(" No model selected! ")])):H("",!0),r.configFile.model_name?(A(),I("div",hht,"|")):H("",!0),r.configFile.model_name?(A(),I("div",fht,[d("div",mht,[d("img",{src:r.imgModel,class:"w-8 h-8 rounded-lg object-fill"},null,8,ght),d("h3",bht,fe(r.configFile.model_name),1)])])):H("",!0)])])]),d("div",{class:Ve([{hidden:s.mzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[d("div",Eht,[d("div",vht,[d("div",yht,[s.searchModelInProgress?(A(),I("div",Sht,xht)):H("",!0),s.searchModelInProgress?H("",!0):(A(),I("div",Cht,wht))]),ee(d("input",{type:"search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search models...",required:"","onUpdate:modelValue":e[259]||(e[259]=h=>s.searchModel=h),onKeyup:e[260]||(e[260]=Hs((...h)=>r.searchModel_func&&r.searchModel_func(...h),["enter"]))},null,544),[[Pe,s.searchModel]]),s.searchModel?(A(),I("button",{key:0,onClick:e[261]||(e[261]=ye(h=>s.searchModel="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):H("",!0)])]),d("div",null,[ee(d("input",{"onUpdate:modelValue":e[262]||(e[262]=h=>s.show_only_installed_models=h),class:"m-2 p-2",type:"checkbox",ref:"only_installed"},null,512),[[it,s.show_only_installed_models]]),Aht]),d("div",null,[Ie(l,{radioOptions:s.sortOptions,onRadioSelected:r.handleRadioSelected},null,8,["radioOptions","onRadioSelected"])]),Nht,s.is_loading_zoo?(A(),I("div",Oht,Dht)):H("",!0),s.models_zoo&&s.models_zoo.length>0?(A(),I("div",kht,[d("label",Lht," Models: ("+fe(s.models_zoo.length)+") ",1),d("div",{class:Ve(["overflow-y-auto p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",s.mzl_collapsed?"":"max-h-96"])},[Ie(os,{name:"list"},{default:Je(()=>[(A(!0),I($e,null,ct(r.rendered_models_zoo,(h,E)=>(A(),xt(u,{ref_for:!0,ref:"modelZoo",key:"index-"+E+"-"+h.name,model:h,"is-installed":h.isInstalled,"on-install":r.onInstall,"on-uninstall":r.onUninstall,"on-selected":r.onModelSelected,selected:h.name===r.configFile.model_name,model_type:h.model_type,"on-copy":r.onCopy,"on-copy-link":r.onCopyLink,"on-cancel-install":r.onCancelInstall},null,8,["model","is-installed","on-install","on-uninstall","on-selected","selected","model_type","on-copy","on-copy-link","on-cancel-install"]))),128)),d("button",{ref:"load_more_models",class:"relative items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 select-none",onClick:e[263]||(e[263]=(...h)=>r.load_more_models&&r.load_more_models(...h))},"Load more models",512)]),_:1})],2)])):H("",!0),s.mzl_collapsed?(A(),I("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[264]||(e[264]=(...h)=>r.open_mzl&&r.open_mzl(...h))},Uht)):(A(),I("button",{key:3,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[265]||(e[265]=(...h)=>r.open_mzl&&r.open_mzl(...h))},Bht)),d("div",Ght,[d("div",Vht,[d("div",null,[d("div",zht,[Hht,ee(d("input",{type:"text","onUpdate:modelValue":e[266]||(e[266]=h=>s.reference_path=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter Path ...",required:""},null,512),[[Pe,s.reference_path]])]),d("button",{type:"button",onClick:e[267]||(e[267]=ye(h=>r.onCreateReference(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Add reference")]),s.modelDownlaodInProgress?H("",!0):(A(),I("div",qht,[d("div",Yht,[$ht,ee(d("input",{type:"text","onUpdate:modelValue":e[268]||(e[268]=h=>s.addModel.url=h),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Enter URL ...",required:""},null,512),[[Pe,s.addModel.url]])]),d("button",{type:"button",onClick:e[269]||(e[269]=ye(h=>r.onInstallAddModel(),["stop"])),class:"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm w-full sm:w-auto px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"},"Download")])),s.modelDownlaodInProgress?(A(),I("div",Wht,[Kht,d("div",jht,[d("div",Qht,[d("div",Xht,[Zht,d("span",Jht,fe(Math.floor(s.addModel.progress))+"%",1)]),d("div",{class:"mx-1 opacity-80 line-clamp-1",title:s.addModel.url},fe(s.addModel.url),9,eft),d("div",tft,[d("div",{class:"bg-blue-600 h-2.5 rounded-full",style:en({width:s.addModel.progress+"%"})},null,4)]),d("div",nft,[d("span",ift,"Download speed: "+fe(r.speed_computed)+"/s",1),d("span",sft,fe(r.downloaded_size_computed)+"/"+fe(r.total_size_computed),1)])])]),d("div",rft,[d("div",oft,[d("div",aft,[d("button",{onClick:e[270]||(e[270]=ye((...h)=>r.onCancelInstall&&r.onCancelInstall(...h),["stop"])),type:"button",title:"Cancel download",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"}," Cancel ")])])])])):H("",!0)])])],2)]),d("div",lft,[d("div",cft,[d("button",{onClick:e[273]||(e[273]=ye(h=>s.pzc_collapsed=!s.pzc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ee(d("div",null,uft,512),[[Ot,s.pzc_collapsed]]),ee(d("div",null,_ft,512),[[Ot,!s.pzc_collapsed]]),hft,r.configFile.personalities?(A(),I("div",fft,"|")):H("",!0),d("div",mft,fe(r.active_pesonality),1),r.configFile.personalities?(A(),I("div",gft,"|")):H("",!0),r.configFile.personalities?(A(),I("div",bft,[r.mountedPersArr.length>0?(A(),I("div",Eft,[(A(!0),I($e,null,ct(r.mountedPersArr,(h,E)=>(A(),I("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedPersonalities"},[d("div",vft,[d("button",{onClick:ye(b=>r.onPersonalitySelected(h),["stop"])},[d("img",{src:s.bUrl+h.avatar,onError:e[271]||(e[271]=(...b)=>r.personalityImgPlacehodler&&r.personalityImgPlacehodler(...b)),class:Ve(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary",r.configFile.active_personality_id==r.configFile.personalities.indexOf(h.full_path)?"border-secondary":"border-transparent z-0"]),title:h.name},null,42,Sft)],8,yft),d("button",{onClick:ye(b=>r.unmountPersonality(h),["stop"])},Cft,8,Tft)])]))),128))])):H("",!0)])):H("",!0),d("button",{onClick:e[272]||(e[272]=ye(h=>r.unmountAll(),["stop"])),class:"bg-bg-light hover:border-green-200 ml-5 dark:bg-bg-dark rounded-full border-2 border-transparent",title:"Unmount All"},wft)])]),d("div",{class:Ve([{hidden:s.pzc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[d("div",Aft,[Nft,d("div",Oft,[d("div",Ift,[s.searchPersonalityInProgress?(A(),I("div",Mft,kft)):H("",!0),s.searchPersonalityInProgress?H("",!0):(A(),I("div",Lft,Uft))]),ee(d("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search personality...",required:"","onUpdate:modelValue":e[274]||(e[274]=h=>s.searchPersonality=h),onKeyup:e[275]||(e[275]=ye((...h)=>r.searchPersonality_func&&r.searchPersonality_func(...h),["stop"]))},null,544),[[Pe,s.searchPersonality]]),s.searchPersonality?(A(),I("button",{key:0,onClick:e[276]||(e[276]=ye(h=>s.searchPersonality="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):H("",!0)])]),s.searchPersonality?H("",!0):(A(),I("div",Fft,[d("label",Bft," Personalities Category: ("+fe(s.persCatgArr.length)+") ",1),d("select",{id:"persCat",onChange:e[277]||(e[277]=h=>r.update_personality_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(A(!0),I($e,null,ct(s.persCatgArr,(h,E)=>(A(),I("option",{key:E,selected:h==this.configFile.personality_category},fe(h),9,Gft))),128))],32)])),d("div",null,[s.personalitiesFiltered.length>0?(A(),I("div",Vft,[d("label",zft,fe(s.searchPersonality?"Search results":"Personalities")+": ("+fe(s.personalitiesFiltered.length)+") ",1),d("div",{class:Ve(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.pzl_collapsed?"":"max-h-96"])},[Ie(os,{name:"bounce"},{default:Je(()=>[(A(!0),I($e,null,ct(s.personalitiesFiltered,(h,E)=>(A(),xt(c,{ref_for:!0,ref:"personalitiesZoo",key:"index-"+E+"-"+h.name,personality:h,select_language:!0,full_path:h.full_path,selected:r.configFile.active_personality_id==r.configFile.personalities.findIndex(b=>b===h.full_path||b===h.full_path+":"+h.language),"on-selected":r.onPersonalitySelected,"on-mount":r.mountPersonality,"on-un-mount":r.unmountPersonality,"on-remount":r.remountPersonality,"on-edit":r.editPersonality,"on-copy-to-custom":r.copyToCustom,"on-reinstall":r.onPersonalityReinstall,"on-settings":r.onSettingsPersonality,"on-copy-personality-name":r.onCopyPersonalityName},null,8,["personality","full_path","selected","on-selected","on-mount","on-un-mount","on-remount","on-edit","on-copy-to-custom","on-reinstall","on-settings","on-copy-personality-name"]))),128))]),_:1})],2)])):H("",!0)]),s.pzl_collapsed?(A(),I("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[278]||(e[278]=h=>s.pzl_collapsed=!s.pzl_collapsed)},qft)):(A(),I("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[279]||(e[279]=h=>s.pzl_collapsed=!s.pzl_collapsed)},$ft))],2)]),d("div",Wft,[d("div",Kft,[d("button",{onClick:e[281]||(e[281]=ye(h=>s.ezc_collapsed=!s.ezc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ee(d("div",null,Qft,512),[[Ot,s.ezc_collapsed]]),ee(d("div",null,Zft,512),[[Ot,!s.ezc_collapsed]]),Jft,r.configFile.extensions?(A(),I("div",emt,"|")):H("",!0),r.configFile.extensions?(A(),I("div",tmt,[r.mountedExtensions.length>0?(A(),I("div",nmt,[(A(!0),I($e,null,ct(r.mountedExtensions,(h,E)=>(A(),I("div",{class:"relative hover:-translate-y-2 duration-300 hover:z-10 shrink-0",key:E+"-"+h.name,ref_for:!0,ref:"mountedExtensions"},[d("div",imt,[d("button",null,[d("img",{src:s.bUrl+h.avatar,onError:e[280]||(e[280]=(...b)=>r.extensionImgPlacehodler&&r.extensionImgPlacehodler(...b)),class:Ve(["w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 group-hover:border-secondary","border-transparent z-0"]),title:h.name},null,40,smt)]),d("button",{onClick:ye(b=>r.unmountExtension(h),["stop"])},amt,8,rmt)])]))),128))])):H("",!0)])):H("",!0)])]),d("div",{class:Ve([{hidden:s.ezc_collapsed},"flex flex-col mb-2 px-3 pb-0"])},[d("div",lmt,[cmt,d("div",dmt,[d("div",umt,[s.searchExtensionInProgress?(A(),I("div",pmt,hmt)):H("",!0),s.searchExtensionInProgress?H("",!0):(A(),I("div",fmt,gmt))]),ee(d("input",{type:"search",id:"personality-search",class:"block w-full p-4 pl-10 text-sm text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Search extension...",required:"","onUpdate:modelValue":e[282]||(e[282]=h=>s.searchExtension=h),onKeyup:e[283]||(e[283]=ye((...h)=>n.searchExtension_func&&n.searchExtension_func(...h),["stop"]))},null,544),[[Pe,s.searchExtension]]),s.searchExtension?(A(),I("button",{key:0,onClick:e[284]||(e[284]=ye(h=>s.searchExtension="",["stop"])),type:"button",class:"text-white absolute right-2.5 bottom-2.5 bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-4 py-2 dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800"}," Clear search")):H("",!0)])]),s.searchExtension?H("",!0):(A(),I("div",bmt,[d("label",Emt," Extensions Category: ("+fe(s.extCatgArr.length)+") ",1),d("select",{id:"extCat",onChange:e[285]||(e[285]=h=>r.update_extension_category(h.target.value,r.refresh)),class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},[(A(!0),I($e,null,ct(s.extCatgArr,(h,E)=>(A(),I("option",{key:E,selected:h==this.extension_category},fe(h),9,vmt))),128))],32)])),d("div",null,[s.extensionsFiltered.length>0?(A(),I("div",ymt,[d("label",Smt,fe(s.searchExtension?"Search results":"Personalities")+": ("+fe(s.extensionsFiltered.length)+") ",1),d("div",{class:Ve(["overflow-y-auto no-scrollbar p-2 pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4",s.ezl_collapsed?"":"max-h-96"])},[(A(!0),I($e,null,ct(s.extensionsFiltered,(h,E)=>(A(),xt(_,{ref_for:!0,ref:"extensionsZoo",key:"index-"+E+"-"+h.name,extension:h,select_language:!0,full_path:h.full_path,"on-mount":r.mountExtension,"on-un-mount":r.unmountExtension,"on-remount":r.remountExtension,"on-reinstall":r.onExtensionReinstall,"on-settings":r.onSettingsExtension},null,8,["extension","full_path","on-mount","on-un-mount","on-remount","on-reinstall","on-settings"]))),128))],2)])):H("",!0)]),s.ezc_collapsed?(A(),I("button",{key:1,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Collapse",type:"button",onClick:e[286]||(e[286]=h=>s.ezl_collapsed=!s.ezl_collapsed)},xmt)):(A(),I("button",{key:2,class:"text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Expand",type:"button",onClick:e[287]||(e[287]=h=>s.ezl_collapsed=!s.ezl_collapsed)},Rmt))],2)]),d("div",wmt,[d("div",Amt,[d("button",{onClick:e[288]||(e[288]=ye(h=>s.mep_collapsed=!s.mep_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 text-left w-full flex items-center"},[ee(d("div",null,Omt,512),[[Ot,s.mep_collapsed]]),ee(d("div",null,Mmt,512),[[Ot,!s.mep_collapsed]]),Dmt])]),d("div",{class:Ve([{hidden:s.mep_collapsed},"flex flex-col mb-2 px-3 pb-0"])},null,2)]),d("div",kmt,[d("div",Lmt,[d("button",{onClick:e[289]||(e[289]=ye(h=>s.mc_collapsed=!s.mc_collapsed,["stop"])),class:"text-2xl hover:text-primary p-2 -m-2 w-full text-left flex items-center"},[ee(d("div",null,Umt,512),[[Ot,s.mc_collapsed]]),ee(d("div",null,Bmt,512),[[Ot,!s.mc_collapsed]]),Gmt])]),d("div",{class:Ve([{hidden:s.mc_collapsed},"flex flex-col mb-2 p-2"])},[d("div",Vmt,[d("div",zmt,[ee(d("input",{id:"override-model-parameters",type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[290]||(e[290]=ye(()=>{},["stop"])),"onUpdate:modelValue":e[291]||(e[291]=h=>r.configFile.override_personality_model_parameters=h),onChange:e[292]||(e[292]=h=>r.update_setting("override_personality_model_parameters",r.configFile.override_personality_model_parameters))},null,544),[[it,r.configFile.override_personality_model_parameters]]),Hmt])]),d("div",{class:Ve(r.configFile.override_personality_model_parameters?"":"pointer-events-none opacity-30")},[d("div",qmt,[Ymt,ee(d("input",{type:"text",id:"seed","onUpdate:modelValue":e[293]||(e[293]=h=>r.configFile.seed=h),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Pe,r.configFile.seed]])]),d("div",$mt,[d("div",Wmt,[d("div",Kmt,[jmt,d("p",Qmt,[ee(d("input",{type:"text",id:"temp-val","onUpdate:modelValue":e[294]||(e[294]=h=>r.configFile.temperature=h),onChange:e[295]||(e[295]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),ee(d("input",{id:"temperature",onChange:e[296]||(e[296]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[297]||(e[297]=h=>r.configFile.temperature=h),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.temperature]])])]),d("div",Xmt,[d("div",Zmt,[d("div",Jmt,[egt,d("p",tgt,[ee(d("input",{type:"text",id:"predict-val","onUpdate:modelValue":e[298]||(e[298]=h=>r.configFile.n_predict=h),onChange:e[299]||(e[299]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),ee(d("input",{id:"predict",type:"range",onChange:e[300]||(e[300]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[301]||(e[301]=h=>r.configFile.n_predict=h),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.n_predict]])])]),d("div",ngt,[d("div",igt,[d("div",sgt,[rgt,d("p",ogt,[ee(d("input",{type:"text",id:"top_k-val","onUpdate:modelValue":e[302]||(e[302]=h=>r.configFile.top_k=h),onChange:e[303]||(e[303]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),ee(d("input",{id:"top_k",type:"range",onChange:e[304]||(e[304]=h=>s.settingsChanged=!0),"onUpdate:modelValue":e[305]||(e[305]=h=>r.configFile.top_k=h),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_k]])])]),d("div",agt,[d("div",lgt,[d("div",cgt,[dgt,d("p",ugt,[ee(d("input",{type:"text",id:"top_p-val","onUpdate:modelValue":e[306]||(e[306]=h=>r.configFile.top_p=h),onChange:e[307]||(e[307]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),ee(d("input",{id:"top_p",type:"range","onUpdate:modelValue":e[308]||(e[308]=h=>r.configFile.top_p=h),min:"0",max:"1",step:"0.01",onChange:e[309]||(e[309]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.top_p]])])]),d("div",pgt,[d("div",_gt,[d("div",hgt,[fgt,d("p",mgt,[ee(d("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":e[310]||(e[310]=h=>r.configFile.repeat_penalty=h),onChange:e[311]||(e[311]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),ee(d("input",{id:"repeat_penalty",onChange:e[312]||(e[312]=h=>s.settingsChanged=!0),type:"range","onUpdate:modelValue":e[313]||(e[313]=h=>r.configFile.repeat_penalty=h),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_penalty]])])]),d("div",ggt,[d("div",bgt,[d("div",Egt,[vgt,d("p",ygt,[ee(d("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":e[314]||(e[314]=h=>r.configFile.repeat_last_n=h),onChange:e[315]||(e[315]=h=>s.settingsChanged=!0),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])]),ee(d("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":e[316]||(e[316]=h=>r.configFile.repeat_last_n=h),min:"0",max:"100",step:"1",onChange:e[317]||(e[317]=h=>s.settingsChanged=!0),class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,544),[[Pe,r.configFile.repeat_last_n]])])])],2)],2)])],2)]),Ie(f,{ref:"addmodeldialog"},null,512),Ie(m,{class:"z-20",show:s.variantSelectionDialogVisible,choices:s.variant_choices,onChoiceSelected:r.onVariantChoiceSelected,onCloseDialog:r.oncloseVariantChoiceDialog,onChoiceValidated:r.onvalidateVariantChoice},null,8,["show","choices","onChoiceSelected","onCloseDialog","onChoiceValidated"])],64)}const Tgt=gt(Uot,[["render",Sgt],["__scopeId","data-v-76127db0"]]),xgt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDataset:""}},methods:{submitForm(){const n={model_name:this.selectedModel,dataset_file:this.selectedDataset,max_length:this.max_length,batch_size:this.batch_size,lr:this.lr,num_epochs:this.num_epochs,output_dir:this.selectedFolder};Ae.post("/start_training",n).then(e=>{})},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDataset(n){const e=n.target.files;e.length>0&&(this.selectedDataset=e[0])}},computed:{selectedModel:{get(){return this.$store.state.selectedModel}},models:{get(){return this.$store.state.modelsArr}}},watch:{model_name(n){console.log("watching model_name",n),this.$refs.clipboardInput.inputValue=n}}},Cgt={key:0,class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Rgt={class:"mb-4"},wgt=d("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),Agt=["value"],Ngt={class:"mb-4"},Ogt=d("label",{for:"dataset_path",class:"text-sm"},"Dataset:",-1),Igt={class:"mb-4"},Mgt=d("label",{for:"lr",class:"text-sm"},"Learning Rate:",-1),Dgt={class:"mb-4"},kgt=d("label",{for:"num_epochs",class:"text-sm"},"Number of Epochs:",-1),Lgt={class:"mb-4"},Pgt=d("label",{for:"max_length",class:"text-sm"},"Max Length:",-1),Ugt={class:"mb-4"},Fgt=d("label",{for:"batch_size",class:"text-sm"},"Batch Size:",-1),Bgt={class:"mb-4"},Ggt=d("label",{for:"output_dir",class:"text-sm"},"Output Directory:",-1),Vgt=d("button",{class:"bg-blue-500 text-white px-4 py-2 rounded"},"Start training",-1),zgt={key:1};function Hgt(n,e,t,i,s,r){const o=ht("Card"),a=ht("ClipBoardTextInput");return r.selectedModel!==null&&r.selectedModel.toLowerCase().includes("gptq")?(A(),I("div",Cgt,[d("form",{onSubmit:e[2]||(e[2]=ye((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:""},[Ie(o,{title:"Training configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Ie(o,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[d("div",Rgt,[wgt,ee(d("select",{"onUpdate:modelValue":e[0]||(e[0]=l=>r.selectedModel=l),onChange:e[1]||(e[1]=(...l)=>n.setModel&&n.setModel(...l)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(A(!0),I($e,null,ct(r.models,l=>(A(),I("option",{key:l,value:l},fe(l),9,Agt))),128))],544),[[Vn,r.selectedModel]])])]),_:1}),Ie(o,{title:"Data",isHorizontal:!1},{default:Je(()=>[d("div",Ngt,[Ogt,Ie(a,{id:"model_path",inputType:"file",value:s.dataset_path,onchange:"selectDataset()"},null,8,["value"])])]),_:1}),Ie(o,{title:"Training",isHorizontal:!1},{default:Je(()=>[d("div",Igt,[Mgt,Ie(a,{id:"model_path",inputType:"integer",value:s.lr},null,8,["value"])]),d("div",Dgt,[kgt,Ie(a,{id:"model_path",inputType:"integer",value:s.num_epochs},null,8,["value"])]),d("div",Lgt,[Pgt,Ie(a,{id:"model_path",inputType:"integer",value:s.max_length},null,8,["value"])]),d("div",Ugt,[Fgt,Ie(a,{id:"model_path",inputType:"integer",value:s.batch_size},null,8,["value"])])]),_:1}),Ie(o,{title:"Output",isHorizontal:!1},{default:Je(()=>[d("div",Bgt,[Ggt,Ie(a,{id:"model_path",inputType:"text",value:n.output_dir},null,8,["value"])])]),_:1})]),_:1}),Ie(o,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Vgt]),_:1})],32)])):(A(),I("div",zgt,[Ie(o,{title:"Info",class:"",isHorizontal:!1},{default:Je(()=>[je(" Only GPTQ models are supported for QLora fine tuning. Please select a GPTQ compatible binding. ")]),_:1})]))}const qgt=gt(xgt,[["render",Hgt]]),Ygt={components:{ClipBoardTextInput:RE,Card:vc},data(){return{model_name:"jondurbin/airoboros-7b-gpt4",tokenizer_name:"jondurbin/airoboros-7b-gpt4",dataset_path:"",max_length:1024,batch_size:4,lr:5e-5,num_epochs:2,selectedFolder:"",selectedDatasetPath:""}},methods:{submitForm(){this.model_name,this.tokenizer_name,this.selectedDatasetPath,this.max_length,this.batch_size,this.lr,this.num_epochs,this.selectedFolder},openFolderSelector(){this.$refs.folder_selector.click()},selectOutputDirectory(n){var t;console.log("here");const e=(t=n.target.files[0])==null?void 0:t.path;console.log(e),e&&(this.selectedFolder=e)},selectDatasetPath(n){const e=n.target.files;e.length>0&&(this.selectedDatasetPath=e[0].webkitRelativePath)}}},$gt={class:"container overflow-y-scroll flex flex-col no-scrollbar shadow-lg p-10 pt-2 bg-bg-light-tone dark:bg-bg-dark-tone"},Wgt={class:"mb-4"},Kgt=d("label",{for:"model_name",class:"text-sm"},"Model Name:",-1),jgt={class:"mb-4"},Qgt=d("label",{for:"tokenizer_name",class:"text-sm"},"Tokenizer Name:",-1),Xgt=d("button",{type:"submit",class:"bg-blue-500 text-white px-4 py-2 rounded"},"Quantize LLM",-1);function Zgt(n,e,t,i,s,r){const o=ht("ClipBoardTextInput"),a=ht("Card");return A(),I("div",$gt,[d("form",{onSubmit:e[0]||(e[0]=ye((...l)=>r.submitForm&&r.submitForm(...l),["prevent"])),class:"max-w-md mx-auto"},[Ie(a,{title:"Quantizing configuration",isHorizontal:!0,disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Ie(a,{title:"Model",class:"",isHorizontal:!1},{default:Je(()=>[d("div",Wgt,[Kgt,Ie(o,{id:"model_path",inputType:"text",value:s.model_name},null,8,["value"])]),d("div",jgt,[Qgt,Ie(o,{id:"model_path",inputType:"text",value:s.tokenizer_name},null,8,["value"])])]),_:1})]),_:1}),Ie(a,{disableHoverAnimation:!0,disableFocus:!0},{default:Je(()=>[Xgt]),_:1})],32)])}const Jgt=gt(Ygt,[["render",Zgt]]),ebt={name:"Discussion",emits:["delete","select","openFolder","editTitle","makeTitle","checked"],props:{id:Number,title:String,selected:Boolean,loading:Boolean,isCheckbox:Boolean,checkBoxValue:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,makeTitleMode:!1,deleteMode:!1,openFolder:!1,editTitle:!1,newTitle:String,checkBoxValue_local:!1}},methods:{cancel(){this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1},deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},openFolderEvent(){this.$emit("openFolder",{id:this.id})},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.makeTitleMode=!1,this.deleteMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},makeTitleEvent(){this.$emit("makeTitle",{id:this.id}),this.showConfirmation=!1},chnageTitle(n){this.newTitle=n},checkedChangeEvent(n,e){this.$emit("checked",n,e)}},mounted(){this.newTitle=this.title,He(()=>{Ye.replace()})},watch:{showConfirmation(){He(()=>{Ye.replace()})},editTitleMode(n){this.showConfirmation=n,this.editTitle=n,n&&He(()=>{try{this.$refs.titleBox.focus()}catch{}})},deleteMode(n){this.showConfirmation=n,n&&He(()=>{this.$refs.titleBox.focus()})},makeTitleMode(n){this.showConfirmation=n},checkBoxValue(n,e){this.checkBoxValue_local=n}}},tbt=["id"],nbt={class:"flex flex-row items-center gap-2"},ibt={key:0},sbt={class:"flex flex-row items-center w-full"},rbt=["title"],obt=["value"],abt={class:"flex items-center flex-1 max-h-6"},lbt={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},cbt=d("i",{"data-feather":"x"},null,-1),dbt=[cbt],ubt=d("i",{"data-feather":"check"},null,-1),pbt=[ubt],_bt={key:1,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},hbt=d("i",{"data-feather":"folder"},null,-1),fbt=[hbt],mbt=d("i",{"data-feather":"type"},null,-1),gbt=[mbt],bbt=d("i",{"data-feather":"edit-2"},null,-1),Ebt=[bbt],vbt=d("i",{"data-feather":"trash"},null,-1),ybt=[vbt];function Sbt(n,e,t,i,s,r){return A(),I("div",{class:Ve([t.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md min-w-[23rem] max-w-[23rem]":" min-w-[23rem] max-w-[23rem]","flex flex-row sm:flex-row flex-wrap flex-shrink: 0 item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+t.id,onClick:e[13]||(e[13]=ye(o=>r.selectEvent(),["stop"]))},[d("div",nbt,[t.isCheckbox?(A(),I("div",ibt,[ee(d("input",{type:"checkbox",class:"w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-700 dark:focus:ring-offset-gray-700 focus:ring-2 dark:bg-gray-600 dark:border-gray-500",onClick:e[0]||(e[0]=ye(()=>{},["stop"])),"onUpdate:modelValue":e[1]||(e[1]=o=>s.checkBoxValue_local=o),onInput:e[2]||(e[2]=o=>r.checkedChangeEvent(o,t.id))},null,544),[[it,s.checkBoxValue_local]])])):H("",!0),t.selected?(A(),I("div",{key:1,class:Ve(["min-h-full w-2 rounded-xl self-stretch",t.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):H("",!0),t.selected?H("",!0):(A(),I("div",{key:2,class:Ve(["w-2",t.loading?"min-h-full w-2 rounded-xl self-stretch animate-bounce bg-accent ":" "])},null,2))]),d("div",sbt,[s.editTitle?H("",!0):(A(),I("p",{key:0,title:t.title,class:"line-clamp-1 w-4/6 ml-1 -mx-5"},fe(t.title?t.title==="untitled"?"New discussion":t.title:"New discussion"),9,rbt)),s.editTitle?(A(),I("input",{key:1,type:"text",id:"title-box",ref:"titleBox",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:t.title,required:"",onKeydown:[e[3]||(e[3]=Hs(ye(o=>r.editTitleEvent(),["exact"]),["enter"])),e[4]||(e[4]=Hs(ye(o=>s.editTitleMode=!1,["exact"]),["esc"]))],onInput:e[5]||(e[5]=o=>r.chnageTitle(o.target.value)),onClick:e[6]||(e[6]=ye(()=>{},["stop"]))},null,40,obt)):H("",!0),d("div",abt,[s.showConfirmation?(A(),I("div",lbt,[d("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:e[7]||(e[7]=ye(o=>r.cancel(),["stop"]))},dbt),d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:e[8]||(e[8]=ye(o=>s.editTitleMode?r.editTitleEvent():s.deleteMode?r.deleteEvent():r.makeTitleEvent(),["stop"]))},pbt)])):H("",!0),s.showConfirmation?H("",!0):(A(),I("div",_bt,[d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Open folder",type:"button",onClick:e[9]||(e[9]=ye(o=>r.openFolderEvent(),["stop"]))},fbt),d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Make a title",type:"button",onClick:e[10]||(e[10]=ye(o=>s.makeTitleMode=!0,["stop"]))},gbt),d("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:e[11]||(e[11]=ye(o=>s.editTitleMode=!0,["stop"]))},Ebt),d("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:e[12]||(e[12]=ye(o=>s.deleteMode=!0,["stop"]))},ybt)]))])])],10,tbt)}const AE=gt(ebt,[["render",Sbt]]),Tbt={data(){return{show:!1,prompt:"",inputText:""}},methods:{showPanel(){this.show=!0},ok(){this.show=!1,this.$emit("ok",this.inputText)},cancel(){this.show=!1,this.inputText=""}},props:{promptText:{type:String,required:!0}},watch:{promptText(n){this.prompt=n}}},xbt={key:0,class:"fixed top-0 left-0 w-full h-full flex justify-center items-center bg-black bg-opacity-50"},Cbt={class:"bg-white p-8 rounded"},Rbt={class:"text-xl font-bold mb-4"};function wbt(n,e,t,i,s,r){return A(),I("div",null,[s.show?(A(),I("div",xbt,[d("div",Cbt,[d("h2",Rbt,fe(t.promptText),1),ee(d("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=o=>s.inputText=o),class:"border border-gray-300 px-4 py-2 rounded mb-4"},null,512),[[Pe,s.inputText]]),d("button",{onClick:e[1]||(e[1]=(...o)=>r.ok&&r.ok(...o)),class:"bg-blue-500 text-white px-4 py-2 rounded mr-2"},"OK"),d("button",{onClick:e[2]||(e[2]=(...o)=>r.cancel&&r.cancel(...o)),class:"bg-gray-500 text-white px-4 py-2 rounded"},"Cancel")])])):H("",!0)])}const EO=gt(Tbt,[["render",wbt]]),Abt={data(){return{id:0,loading:!1,isCheckbox:!1,isVisible:!1,categories:[],titles:[],content:"",searchQuery:""}},components:{Discussion:AE,MarkdownRenderer:op},props:{host:{type:String,required:!1,default:"http://localhost:9600"}},methods:{showSkillsLibrary(){this.isVisible=!0,this.fetchTitles()},closeComponent(){this.isVisible=!1},fetchCategories(){Ae.post("/get_skills_library_categories",{client_id:this.$store.state.client_id}).then(n=>{this.categories=n.data.categories}).catch(n=>{console.error("Error fetching categories:",n)})},fetchTitles(){console.log("Fetching categories"),Ae.post("/get_skills_library_titles",{client_id:this.$store.state.client_id}).then(n=>{this.titles=n.data.titles,console.log("titles recovered")}).catch(n=>{console.error("Error fetching titles:",n)})},fetchContent(n){Ae.post("/get_skills_library_content",{client_id:this.$store.state.client_id,skill_id:n}).then(e=>{const t=e.data.contents[0];this.id=t.id,this.content=t.content}).catch(e=>{console.error("Error fetching content:",e)})},deleteCategory(n){console.log("Delete category")},editCategory(n){console.log("Edit category")},checkUncheckCategory(n){console.log("Unchecked category")},deleteSkill(n){console.log("Delete skill ",n),Ae.post("/delete_skill",{client_id:this.$store.state.client_id,skill_id:n}).then(()=>{this.fetchTitles()})},editTitle(n){Ae.post("/edit_skill_title",{client_id:this.$store.state.client_id,skill_id:n,title:n}).then(()=>{this.fetchTitles()}),console.log("Edit title")},makeTitle(n){console.log("Make title")},checkUncheckTitle(n){},searchSkills(){}}},Nbt={id:"leftPanel",class:"flex flex-row h-full flex-grow shadow-lg rounded"},Obt={class:"min-w-[23rem] max-w-[23rem] z-10 top-0 bg-bg-light-tone dark:bg-bg-dark-tone shadow-md overflow-y-scroll no-scrollbar"},Ibt={class:"search p-4"},Mbt={classclass:"absolute flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone top-20 left-20 bottom-20 right-20 bg-bg-light shadow-lg rounded"},Dbt=d("h2",{class:"text-xl font-bold m-4"},"Titles",-1),kbt={class:"z-0 flex flex-col flex-grow overflow-y-auto scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Lbt=d("h2",{class:"text-xl font-bold m-4"},"Content",-1);function Pbt(n,e,t,i,s,r){const o=ht("Discussion"),a=ht("MarkdownRenderer");return A(),I("div",{class:Ve([{hidden:!s.isVisible},"absolute flex flex-col no-scrollbar shadow-lg bg-bg-light dark:bg-bg-dark top-20 left-20 bottom-20 right-20 shadow-lg rounded"])},[d("div",Nbt,[d("div",Obt,[d("div",Ibt,[ee(d("input",{type:"text","onUpdate:modelValue":e[0]||(e[0]=l=>s.searchQuery=l),placeholder:"Search skills",class:"border border-gray-300 rounded px-2 py-1 mr-2"},null,512),[[Pe,s.searchQuery]]),d("button",{onClick:e[1]||(e[1]=(...l)=>r.searchSkills&&r.searchSkills(...l)),class:"bg-blue-500 text-white rounded px-4 py-1"},"Search")]),d("div",Mbt,[Dbt,s.titles.length>0?(A(),xt(os,{key:0,name:"list"},{default:Je(()=>[(A(!0),I($e,null,ct(s.titles,l=>(A(),xt(o,{key:l.id,id:l.id,title:l.title,selected:r.fetchContent(l.id),loading:s.loading,isCheckbox:s.isCheckbox,checkBoxValue:!1,onSelect:u=>r.fetchContent(l.id),onDelete:u=>r.deleteSkill(l.id),onEditTitle:r.editTitle,onMakeTitle:r.makeTitle,onChecked:r.checkUncheckTitle},null,8,["id","title","selected","loading","isCheckbox","onSelect","onDelete","onEditTitle","onMakeTitle","onChecked"]))),128))]),_:1})):H("",!0)])]),d("div",kbt,[Lbt,Ie(a,{host:t.host,"markdown-text":s.content,message_id:s.id,discussion_id:s.id,client_id:this.$store.state.client_id},null,8,["host","markdown-text","message_id","discussion_id","client_id"])])]),d("button",{onClick:e[2]||(e[2]=(...l)=>r.closeComponent&&r.closeComponent(...l)),class:"absolute top-2 right-2 bg-red-500 text-white rounded px-2 py-1 hover:bg-red-300"},"Close")],2)}const vO=gt(Abt,[["render",Pbt]]),Ubt={props:{htmlContent:{type:String,required:!0}}},Fbt=["innerHTML"];function Bbt(n,e,t,i,s,r){return A(),I("div",null,[d("div",{innerHTML:t.htmlContent},null,8,Fbt)])}const Gbt=gt(Ubt,[["render",Bbt]]);const Vbt={props:{jsonData:{type:[Object,Array,String],default:null},jsonFormText:{type:String,default:"JSON Form"}},data(){return{collapsed:!0}},computed:{formattedJson(){return typeof this.jsonData=="string"?JSON.stringify(JSON.parse(this.jsonData),null," ").replace(/\n/g," "):JSON.stringify(this.jsonData,null," ").replace(/\n/g," ")},isObject(){return typeof this.jsonData=="object"&&this.jsonData!==null},isContentPresent(){return this.jsonData!==null&&(typeof this.jsonData!="string"||this.jsonData.trim()!=="")}},methods:{toggleCollapsed(){this.collapsed=!this.collapsed},toggleCollapsible(){this.collapsed=!this.collapsed}}},zbt={key:0},Hbt={class:"toggle-icon mr-1"},qbt={key:0,class:"fas fa-plus-circle text-gray-600"},Ybt={key:1,class:"fas fa-minus-circle text-gray-600"},$bt={class:"json-viewer max-h-64 overflow-auto p-4 bg-gray-100 border border-gray-300 rounded dark:bg-gray-600"},Wbt={key:0,class:"fas fa-plus-circle text-gray-600"},Kbt={key:1,class:"fas fa-minus-circle text-gray-600"},jbt=["innerHTML"];function Qbt(n,e,t,i,s,r){return r.isContentPresent?(A(),I("div",zbt,[d("div",{class:"collapsible-section cursor-pointer mb-4 font-bold hover:text-gray-900",onClick:e[0]||(e[0]=(...o)=>r.toggleCollapsible&&r.toggleCollapsible(...o))},[d("span",Hbt,[s.collapsed?(A(),I("i",qbt)):(A(),I("i",Ybt))]),je(" "+fe(t.jsonFormText),1)]),ee(d("div",null,[d("div",$bt,[r.isObject?(A(),I("span",{key:0,onClick:e[1]||(e[1]=(...o)=>r.toggleCollapsed&&r.toggleCollapsed(...o)),class:"toggle-icon cursor-pointer mr-1"},[s.collapsed?(A(),I("i",Wbt)):(A(),I("i",Kbt))])):H("",!0),d("pre",{innerHTML:r.formattedJson},null,8,jbt)])],512),[[Ot,!s.collapsed]])])):H("",!0)}const Xbt=gt(Vbt,[["render",Qbt]]),Zbt={props:{done:{type:Boolean,required:!0},message:{type:String,required:!0},status:{type:Boolean,required:!0},step_type:{type:String,required:!1,default:"start_end"}}},Jbt={class:"flex items-start"},eEt={class:"step flex items-center mb-4"},tEt={key:0,class:"flex items-center justify-center w-6 h-6 mr-2"},nEt={key:0},iEt=d("i",{"data-feather":"square",class:"text-gray-400 w-4 h-4"},null,-1),sEt=[iEt],rEt={key:1},oEt=d("i",{"data-feather":"check-square",class:"text-green-500 w-4 h-4"},null,-1),aEt=[oEt],lEt={key:2},cEt=d("i",{"data-feather":"x-square",class:"text-red-500 w-4 h-4"},null,-1),dEt=[cEt],uEt={key:1,role:"status",class:"m-15"},pEt=d("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1),_Et=[pEt],hEt={class:"text-sm ml-6"};function fEt(n,e,t,i,s,r){return A(),I("div",Jbt,[d("div",eEt,[t.step_type=="start_end"?(A(),I("div",tEt,[t.done?H("",!0):(A(),I("div",nEt,sEt)),t.done&&t.status?(A(),I("div",rEt,aEt)):H("",!0),t.done&&!t.status?(A(),I("div",lEt,dEt)):H("",!0)])):H("",!0),t.done?H("",!0):(A(),I("div",uEt,_Et)),d("h3",hEt,fe(t.message),1)])])}const mEt=gt(Zbt,[["render",fEt]]),gEt="/assets/process-61f7a21b.svg",bEt="/assets/ok-a0b56451.svg",EEt="/assets/failed-183609e7.svg",yO="/assets/send_globe-305330b9.svg";const vEt="/",yEt={name:"Message",emits:["copy","delete","rankUp","rankDown","updateMessage","resendMessage","continueMessage"],components:{MarkdownRenderer:op,Step:mEt,RenderHTMLJS:Gbt,JsonViewer:Xbt,DynamicUIRenderer:bO},props:{host:{type:String,required:!1,default:"http://localhost:9600"},message:Object,avatar:{default:""}},data(){return{isSynthesizingVoice:!1,cpp_block:uO,html5_block:pO,LaTeX_block:_O,json_block:dO,javascript_block:cO,process_svg:gEt,ok_svg:bEt,failed_svg:EEt,loading_svg:fO,sendGlobe:yO,code_block:aO,python_block:lO,bash_block:hO,audio_url:null,audio:null,msg:null,isSpeaking:!1,speechSynthesis:null,voices:[],expanded:!1,showConfirmation:!1,editMsgMode_:!1,deleteMsgMode:!1,mdRenderHeight:Number}},mounted(){if("speechSynthesis"in window?(this.speechSynthesis=window.speechSynthesis,this.voices=this.speechSynthesis.getVoices(),this.voices.length===0?this.speechSynthesis.addEventListener("voiceschanged",this.onVoicesChanged):console.log("No voices found")):console.error("Speech synthesis is not supported in this browser."),He(()=>{Ye.replace(),this.mdRenderHeight=this.$refs.mdRender.$el.offsetHeight}),console.log("Checking metadata"),console.log(this.message),Object.prototype.hasOwnProperty.call(this.message,"metadata")&&this.message.metadata!=null){console.log("Metadata found!"),Array.isArray(this.message.metadata)||(this.message.metadata=[]),console.log(typeof this.message.metadata),console.log(this.message.metadata);for(let n of this.message.metadata)Object.prototype.hasOwnProperty.call(n,"audio_url")&&n.audio_url!=null&&(this.audio_url=n.audio_url,console.log("Audio URL:",this.audio_url))}},methods:{computeTimeDiff(n,e){let t=e.getTime()-n.getTime();const i=Math.floor(t/(1e3*60*60));t-=i*(1e3*60*60);const s=Math.floor(t/(1e3*60));t-=s*(1e3*60);const r=Math.floor(t/1e3);return t-=r*1e3,[i,s,r]},insertTab(n){const e=n.target,t=e.selectionStart,i=e.selectionEnd,s=n.shiftKey;if(t===i)if(s){if(e.value.substring(t-4,t)==" "){const r=e.value.substring(0,t-4),o=e.value.substring(i),a=r+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t-4})}}else{const r=e.value.substring(0,t),o=e.value.substring(i),a=r+" "+o;this.message.content=a,this.$nextTick(()=>{e.selectionStart=e.selectionEnd=t+4})}else{const o=e.value.substring(t,i).split(`
`).map(c=>c.trim()===""?c:s?c.startsWith(" ")?c.substring(4):c:" "+c),a=e.value.substring(0,t),l=e.value.substring(i),u=a+o.join(`
`)+l;this.message.content=u,this.$nextTick(()=>{e.selectionStart=t,e.selectionEnd=i+o.length*4})}n.preventDefault()},onVoicesChanged(){this.voices=this.speechSynthesis.getVoices()},read(){this.isSynthesizingVoice?(this.isSynthesizingVoice=!1,this.$refs.audio_player.pause()):(this.isSynthesizingVoice=!0,Ae.post("./text2wav",{text:this.message.content}).then(n=>{this.isSynthesizingVoice=!1;let e=n.data.url;console.log(e),this.audio_url=e,this.message.metadata||(this.message.metadata=[]);let t=!1;for(let i of this.message.metadata)Object.prototype.hasOwnProperty.call(i,"audio_url")&&(i.audio_url=this.audio_url,t=!0);t||this.message.metadata.push({audio_url:this.audio_url}),this.$emit("updateMessage",this.message.id,this.message.content,this.audio_url)}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSynthesizingVoice=!1}))},speak(){if(this.$store.state.config.xtts_enable&&this.$store.state.config.xtts_use_streaming_mode)this.isSpeaking=!0,Ae.post("./text2Audio",{text:this.message.content}).then(n=>{this.isSpeaking=!1}).catch(n=>{this.$store.state.toast.showToast(`Error: ${n}`,4,!1),this.isSpeaking=!1});else{if(this.msg){this.speechSynthesis.cancel(),this.msg=null,this.isSpeaking=!1;return}let n=0;console.log("voice on"),this.isSpeaking=!0;const e=200;this.message.content,this.msg=new SpeechSynthesisUtterance,this.msg.pitch=this.$store.state.config.audio_pitch,this.voices.length>0&&(this.msg.voice=this.voices.filter(s=>s.name===this.$store.state.config.audio_out_voice)[0]);const t=s=>{let r=this.message.content.substring(s,s+e);const o=[".","!","?",`
-`];let a=-1;return o.forEach(l=>{const u=r.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=r.length),console.log(a),a+s+1},i=()=>{if(this.message.content.includes(".")){const s=t(n),r=this.message.content.substring(n,s);this.msg.text=r,n=s+1,this.msg.onend=o=>{n{i()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{i()},1)};i()}},toggleModel(){this.expanded=!this.expanded},addBlock(n){let e=this.$refs.mdTextarea.selectionStart,t=this.$refs.mdTextarea.selectionEnd;e==t?speechSynthesis==0||this.message.content[e-1]==`
+`];let a=-1;return o.forEach(l=>{const u=r.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=r.length),console.log(a),a+s+1},i=()=>{if(this.status_message=="Done"||this.message.content.includes(".")||this.message.content.includes("?")||this.message.content.includes("!")){const s=t(n),r=this.message.content.substring(n,s);this.msg.text=r,n=s+1,this.msg.onend=o=>{n{i()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{i()},1)};console.log("Speaking chunk"),i()}},toggleModel(){this.expanded=!this.expanded},addBlock(n){let e=this.$refs.mdTextarea.selectionStart,t=this.$refs.mdTextarea.selectionEnd;e==t?speechSynthesis==0||this.message.content[e-1]==`
`?(this.message.content=this.message.content.slice(0,e)+"```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+"\n\n```\n"+this.message.content.slice(e),e=e+3+n.length):speechSynthesis==0||this.message.content[e-1]==`
`?(this.message.content=this.message.content.slice(0,e)+"```"+n+`
`+this.message.content.slice(e,t)+"\n```\n"+this.message.content.slice(t),e=e+4+n.length):(this.message.content=this.message.content.slice(0,e)+"\n```"+n+`
diff --git a/web/dist/index.html b/web/dist/index.html
index ece8242c..e825c121 100644
--- a/web/dist/index.html
+++ b/web/dist/index.html
@@ -6,7 +6,7 @@
LoLLMS WebUI - Welcome
-
+
diff --git a/web/src/components/Message.vue b/web/src/components/Message.vue
index 3254bf9d..1af26eda 100644
--- a/web/src/components/Message.vue
+++ b/web/src/components/Message.vue
@@ -577,7 +577,7 @@ export default {
// Function to speak a chunk of text
const speakChunk = () => {
- if (this.message.content.includes('.')){
+ if (this.status_message=='Done' || this.message.content.includes('.')||this.message.content.includes('?')||this.message.content.includes('!')){
const endIndex = findLastSentenceIndex(startIndex);
const chunk = this.message.content.substring(startIndex, endIndex);
this.msg.text = chunk;
@@ -604,6 +604,7 @@ export default {
};
// Speak the first chunk
+ console.log("Speaking chunk")
speakChunk();
}
diff --git a/zoos/personalities_zoo b/zoos/personalities_zoo
index 7b17da78..7b024466 160000
--- a/zoos/personalities_zoo
+++ b/zoos/personalities_zoo
@@ -1 +1 @@
-Subproject commit 7b17da7867b7fb349601bc3f73688464429f46ee
+Subproject commit 7b0244663699ab0a49ee03730bf39e53a8e44913