Update qwen_gen_data_NoBash.py 添加对qwen-max的异常处理

This commit is contained in:
HongCheng 2024-03-17 08:53:50 +09:00 committed by GitHub
parent 025061b0ab
commit 24a16455ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,7 +23,14 @@ def qwen_api(data, emo):
病人病人的咨询或陈述
医生医生的安抚和建议
'''
response = dashscope.Generation.call(
try:
response = dashscope.Generation.call(
model='qwen-max',
prompt=prompt,
history=[],
)
except:
response = dashscope.Generation.call(
model='qwen-max',
prompt=prompt,
history=[],