chore: apply flake8-comprehensions Ruff rules to improve collection comprehensions (#5652)
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
parent
2e718b85e9
commit
dcb72e0067
58 changed files with 123 additions and 136 deletions
|
|
@ -514,8 +514,8 @@ class WorkflowConverter:
|
|||
|
||||
prompt_rules = prompt_template_config['prompt_rules']
|
||||
role_prefix = {
|
||||
"user": prompt_rules['human_prefix'] if 'human_prefix' in prompt_rules else 'Human',
|
||||
"assistant": prompt_rules['assistant_prefix'] if 'assistant_prefix' in prompt_rules else 'Assistant'
|
||||
"user": prompt_rules.get('human_prefix', 'Human'),
|
||||
"assistant": prompt_rules.get('assistant_prefix', 'Assistant')
|
||||
}
|
||||
else:
|
||||
advanced_completion_prompt_template = prompt_template.advanced_completion_prompt_template
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue