tingwu_new
All checks were successful
Deploy to Server / deploy (push) Successful in 13s

This commit is contained in:
jeremygan2021
2026-03-11 14:55:37 +08:00
parent 84e36bdd02
commit 6d5be796cd

View File

@@ -71,7 +71,16 @@ class AliyunTingwuService:
raise Exception("Tingwu Client not initialized")
request = CreateTaskRequest.CreateTaskRequest()
request.set_AppKey(self.tingwu_app_key)
# 听悟新版 SDK 20230930 版本的 AppKey 设置方式可能不同
# 尝试使用通用的 set_app_key 或通过请求参数传递
try:
request.set_AppKey(self.tingwu_app_key)
except AttributeError:
try:
request.set_app_key(self.tingwu_app_key)
except AttributeError:
# 如果都没有,尝试作为参数直接设置 (某些版本的 SDK 行为)
request.add_query_param('AppKey', self.tingwu_app_key)
# 配置 Input
input_param = {