fix: tts file was deleted before invocation

This commit is contained in:
Yeuoly 2024-09-26 15:47:16 +08:00
parent 0ad9dbea63
commit 507fff0259
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61

View File

@ -145,14 +145,14 @@ class PluginModelBackwardsInvocation(BaseBackwardsInvocation):
temp.flush()
temp.seek(0)
response = model_instance.invoke_speech2text(
file=temp,
user=user_id,
)
response = model_instance.invoke_speech2text(
file=temp,
user=user_id,
)
return {
"result": response,
}
return {
"result": response,
}
@classmethod
def invoke_moderation(cls, user_id: str, tenant: Tenant, payload: RequestInvokeModeration):