chore: skip unnecessary key checks prior to accessing a dictionary (#4497)
This commit is contained in:
parent
aa13d14019
commit
04ad46dd31
30 changed files with 45 additions and 44 deletions
|
|
@ -70,7 +70,7 @@ class StableDiffusionTool(BuiltinTool):
|
|||
if not base_url:
|
||||
return self.create_text_message('Please input base_url')
|
||||
|
||||
if 'model' in tool_parameters and tool_parameters['model']:
|
||||
if tool_parameters.get('model'):
|
||||
self.runtime.credentials['model'] = tool_parameters['model']
|
||||
|
||||
model = self.runtime.credentials.get('model', None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue