fix translateAI function in multiple modules
This commit is contained in:
parent
e75705435b
commit
1eb1094b1f
9 changed files with 11 additions and 11 deletions
|
|
@ -350,7 +350,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -410,7 +410,7 @@ def getSpeaker(speaker):
|
|||
return [speaker, [0, 0]]
|
||||
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Translate text using the shared translation utility.
|
||||
This function maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -506,7 +506,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -3683,7 +3683,7 @@ def getSpeaker(speaker: str):
|
|||
NAMESLIST.append([speaker, translated])
|
||||
return [translated, response[1]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -1113,7 +1113,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -2231,7 +2231,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None, filename=None, pbar=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
@ -2253,8 +2253,8 @@ def translateAI(text, history):
|
|||
text=text,
|
||||
history=history,
|
||||
config=TRANSLATION_CONFIG,
|
||||
filename=FILENAME,
|
||||
pbar=PBAR,
|
||||
filename=filename if filename is not None else FILENAME,
|
||||
pbar=pbar if pbar is not None else PBAR,
|
||||
lock=LOCK,
|
||||
mismatchList=MISMATCH
|
||||
)
|
||||
|
|
|
|||
|
|
@ -341,7 +341,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ def getSpeaker(speaker):
|
|||
return response
|
||||
return [speaker, [0, 0]]
|
||||
|
||||
def translateAI(text, history):
|
||||
def translateAI(text, history, history_ctx=None):
|
||||
"""
|
||||
Legacy wrapper function for the new shared translation utility.
|
||||
This maintains compatibility with existing code while using the new shared implementation.
|
||||
|
|
|
|||
Loading…
Reference in a new issue