fix: add specific exceptions

This commit is contained in:
Yeuoly 2024-12-24 22:00:45 +08:00
parent f589397f25
commit 6ee7ca1890

View File

@ -283,7 +283,7 @@ class ApiBasedToolSchemaParser:
api = openai_plugin["api"]
api_url = api["url"]
api_type = api["type"]
except:
except JSONDecodeError:
raise ToolProviderNotFoundError("Invalid openai plugin json.")
if api_type != "openapi":