File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class WebLLM(JSComponent):
5353 )
5454
5555 system = param .String (
56- default = "Be the best helper! " ,
56+ default = "Be a world-class helper. Try to keep your answers concise. " ,
5757 doc = "The system prompt for the model completion." ,
5858 )
5959
@@ -480,9 +480,14 @@ def __init__(self, **params):
480480 ** self .web_llm_kwargs ,
481481 )
482482 self .callback = self .web_llm .callback
483+ self .edit_callback = self ._edit_callback
483484 self .header = pn .Column (self .web_llm .menu , self .web_llm )
484485 pn .state .onload (self ._onload )
485486
487+ def _edit_callback (self , contents , index , instance ):
488+ instance .objects = instance .objects [: index + 1 ]
489+ self .respond ()
490+
486491 def _onload (self ):
487492 if self .load_on_init :
488493 self .web_llm .load_model = True
You can’t perform that action at this time.
0 commit comments