fix: skip dataset icon (#3696)

This commit is contained in:
Yeuoly 2024-04-23 12:41:41 +08:00 committed by GitHub
parent 9525ccac4f
commit 2c50fab3dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -82,6 +82,7 @@ class AgentService:
tool_output = tool_outputs.get(tool_name, {})
tool_meta_data = tool_meta.get(tool_name, {})
tool_config = tool_meta_data.get('tool_config', {})
if tool_config.get('tool_provider_type', '') != 'dataset-retrieval':
tool_icon = ToolManager.get_tool_icon(
tenant_id=app_model.tenant_id,
provider_type=tool_config.get('tool_provider_type', ''),
@ -95,6 +96,8 @@ class AgentService:
provider_type=tool_entity.provider_type,
provider_id=tool_entity.provider_id,
)
else:
tool_icon = ''
tool_calls.append({
'status': 'success' if not tool_meta_data.get('error') else 'error',