Merge pull request #90 from chg0901/patch-9

Update qwen_gen_data_NoBash.py 添加对qwen-max的异常处理
This commit is contained in:
xzw 2024-03-17 13:16:01 +08:00 committed by GitHub
commit 1c2f697d72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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