🚧[WIP/TEST] Controller : 応答値を修正/各セクションでprocess.logに書き出す用に追加

This commit is contained in:
misyaguziya
2024-07-30 15:37:58 +09:00
parent 209070f90e
commit e4fe2dd907
2 changed files with 41 additions and 29 deletions

View File

@@ -83,7 +83,7 @@ class MicMessage:
addSentMessageLog(message)
translation = ""
if model.checkKeywords(message):
self.action({"status":"error", f"message":"Detected by word filter:{message}"})
self.action({"status":"error", "message":f"Detected by word filter:{message}"})
return
elif model.detectRepeatSendMessage(message):
return
@@ -416,12 +416,12 @@ def callbackEnableTranslation(*args, **kwargs) -> dict:
config.ENABLE_TRANSLATION = True
if model.isLoadedCTranslate2Model() is False:
model.changeTranslatorCTranslate2Model()
return {"status":"success"}
return {"status":"success", "data":config.ENABLE_TRANSLATION}
def callbackDisableTranslation(*args, **kwargs) -> dict:
print("callbackDisableTranslation")
config.ENABLE_TRANSLATION = False
return {"status":"success"}
return {"status":"success", "data":config.ENABLE_TRANSLATION}
def callbackEnableTranscriptionSend(data, action, *args, **kwargs) -> dict:
print("callbackEnableTranscriptionSend")