Skip to content

Commit 5715ec6

Browse files
authored
Refactor configuration for onFilterText
1 parent 11b363a commit 5715ec6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

services/L_Llm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def initLlm():
2222
runtime.getConfig()
2323
#python.subscribe(llm.getName(), "publishText", "onFilterText")
2424
config = llm.getConfig()
25+
if config.listeners == None or config.listeners == []:
26+
python.subscribe(llm.getName(), "publishText", "onFilterText")
2527
if config.url == None or config.url == "http://localhost:11434" or config.url == "http://localhost:11434/v1/chat/completions":
2628
config.url = "http://localhost:11434/api/generate"
2729
runtime.warn('url is set by default to a localhost')

0 commit comments

Comments
 (0)