Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion generate_data/qwen_gen_data_NoBash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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=[],
Expand Down