bugfix: model str maybe empty (#2660)

This commit is contained in:
nan jiang 2024-03-03 11:43:38 +08:00 committed by GitHub
parent 2001483659
commit bc65ee10c0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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:
if 'model' in tool_parameters and tool_parameters['model']:
self.runtime.credentials['model'] = tool_parameters['model']
model = self.runtime.credentials.get('model', None)