@@ -55,7 +55,7 @@ class ChatMKAI {
5555 console . log ( "ChatMK AI: Loading model from" , this . modelPath ) ;
5656
5757 // Load the model with user-visible progress
58- this . updateLoadingStatus ( "Downloading AI model from Hugging Face..." ) ;
58+ this . updateLoadingStatus ( "Downloading language model from Hugging Face..." ) ;
5959
6060 await this . wllama . loadModelFromUrl ( this . modelPath , {
6161 n_ctx : 2048 , // Set context size during model loading
@@ -69,7 +69,7 @@ class ChatMKAI {
6969 `ChatMK AI: Model loading ${ percent } % (${ mbLoaded } /${ mbTotal } MB)`
7070 ) ;
7171 this . updateLoadingStatus (
72- `Loading AI model... ${ percent } % (${ mbLoaded } /${ mbTotal } MB)`
72+ `Loading language model... ${ percent } % (${ mbLoaded } /${ mbTotal } MB)`
7373 ) ;
7474
7575 // Show progress in modal if open
@@ -82,15 +82,15 @@ class ChatMKAI {
8282 console . log ( "ChatMK AI: Model loaded successfully!" ) ;
8383
8484 // Update UI to show AI is ready
85- this . updateLoadingStatus ( "AI ready!" ) ;
85+ this . updateLoadingStatus ( "Language model ready!" ) ;
8686
8787 return true ;
8888 } catch ( error ) {
8989 console . error ( "ChatMK AI: Failed to initialize model:" , error ) ;
9090 this . isLoading = false ;
9191
9292 // For now, disable AI if it fails to load
93- this . updateLoadingStatus ( "AI unavailable - using search only" ) ;
93+ this . updateLoadingStatus ( "Language model unavailable - using search only" ) ;
9494 return false ;
9595 }
9696 }
@@ -100,7 +100,7 @@ class ChatMKAI {
100100 */
101101 async generateResponse ( query , searchResults = [ ] ) {
102102 if ( ! this . isLoaded || ! this . wllama ) {
103- throw new Error ( "AI model not loaded. Please wait for initialization." ) ;
103+ throw new Error ( "Language model not loaded. Please wait for initialization." ) ;
104104 }
105105
106106 try {
@@ -156,7 +156,7 @@ class ChatMKAI {
156156 // Provide a fallback response based on search results
157157 if ( searchResults . length > 0 ) {
158158 throw new Error (
159- `AI generation failed, but here are relevant results: ${ searchResults
159+ `Language model generation failed, but here are relevant results: ${ searchResults
160160 . map ( ( r ) => r . title )
161161 . join ( ", " ) } `
162162 ) ;
@@ -211,7 +211,9 @@ ${userMessage}
211211 const modal = document . getElementById ( "chatmk-modal" ) ;
212212 if ( modal && modal . classList . contains ( "is-active" ) ) {
213213 // Add a system message about AI loading progress
214- const progressMsg = `AI model loading: ${ percent } % (${ mbLoaded } /${ mbTotal } MB)` ;
214+ const progressMsg = percent === 100
215+ ? `Language model loaded: SmolLM2-360M-Q8`
216+ : `Language model loading: ${ percent } % (${ mbLoaded } /${ mbTotal } MB)` ;
215217
216218 // Check if there's already a progress message and update it
217219 const messages = document . getElementById ( "chatmk-messages" ) ;
0 commit comments