Merge pull request #90 from chg0901/patch-9
Update qwen_gen_data_NoBash.py 添加对qwen-max的异常处理
This commit is contained in:
commit
1c2f697d72
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user