Skip to content

Commit 3a54d8b

Browse files
authored
Merge pull request #268 from MyRobotLab/fix-for-onFilterText
Disable htmlFilter interactions in llm_stop script
2 parents ad8d234 + 923722c commit 3a54d8b

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

services/L_Llm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def initLlm():
2020
llm.getConfig()
2121
setSystem = llm.getConfig().system
2222
runtime.getConfig()
23-
python.subscribe(llm.getName(), "publishText", "onFilterText")
23+
#python.subscribe(llm.getName(), "publishText", "onFilterText")
2424
config = llm.getConfig()
2525
if config.url == None or config.url == "http://localhost:11434" or config.url == "http://localhost:11434/v1/chat/completions":
2626
config.url = "http://localhost:11434/api/generate"
@@ -143,7 +143,7 @@ def initLlm():
143143
The current date is {{Date}}.\
144144
My user name is {{UserName}}, you can find information about me and my life in {{Predicates}}.\
145145
This is a list of your properties, you will use those {{Properties}} if I ask you something about yourself."
146-
llm.removeListener('publishText', 'i01.htmlFilter', 'onText')
146+
#llm.removeListener('publishText', 'i01.htmlFilter', 'onText')
147147
llm.save()
148148
llm.apply(config)
149149
llm.broadcastState()
@@ -235,7 +235,7 @@ def describeImage(prompt):
235235
if cfg.stream == "false":
236236
cfg.stream = "true"
237237
#python.subscribe(llmImg.getName(), "publishText", "onFilterText")
238-
i01_htmlFilter.subscribe(llmImg.getName(), "publishText", "onText")
238+
#i01_htmlFilter.subscribe(llmImg.getName(), "publishText", "onText")
239239
#llmImg.removeListener('publishText', 'i01.htmlFilter', 'onText')
240240
llmImg.save()
241241
llmImg.apply(cfg)
@@ -253,3 +253,4 @@ def describeImage(prompt):
253253

254254

255255

256+

system/startScripts/i01_llm_stop.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
chatBot.savePredicates()
1313

1414
llm = runtime.getService('i01.llm')
15-
htmlFilter = runtime.getService('i01.htmlFilter')
15+
#htmlFilter = runtime.getService('i01.htmlFilter')
1616
if llm:
1717
config = llm.getConfig()
1818
config.system = "You are a helpful robot."
19-
if htmlFilter:
20-
htmlFilter.subscribe(llm.getName(), "publishText", "onText")
21-
llm.removeListener('publishText', 'python', 'onFilterText')
19+
#if htmlFilter:
20+
#htmlFilter.subscribe(llm.getName(), "publishText", "onText")
21+
#llm.removeListener('publishText', 'python', 'onFilterText')
2222
llm.save()
2323
llm.apply(config)
2424
llm.broadcastState()

0 commit comments

Comments
 (0)