From 09344bbb804ea34e76c64b547e847e46cd8e5774 Mon Sep 17 00:00:00 2001 From: dan-sullivan Date: Sat, 5 Apr 2025 14:18:14 +0100 Subject: [PATCH 1/2] Fallback from desc to summary to placeholder --- src/lib/utils/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/utils/index.ts b/src/lib/utils/index.ts index 927f62ab3..17726a7e9 100644 --- a/src/lib/utils/index.ts +++ b/src/lib/utils/index.ts @@ -1128,7 +1128,7 @@ export const convertOpenApiToToolPayload = (openApiSpec) => { const tool = { type: 'function', name: operation.operationId, - description: operation.summary || 'No description available.', + description: operation.description || operation.summary || 'No description available.', parameters: { type: 'object', properties: {}, From 9ea6cea0baa7b2eab23c3b4db3b03a7afe811da4 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 5 Apr 2025 14:31:22 -0700 Subject: [PATCH 2/2] refac --- backend/open_webui/utils/tools.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/utils/tools.py b/backend/open_webui/utils/tools.py index 60311a690..734c23e1b 100644 --- a/backend/open_webui/utils/tools.py +++ b/backend/open_webui/utils/tools.py @@ -337,7 +337,9 @@ def convert_openapi_to_tool_payload(openapi_spec): tool = { "type": "function", "name": operation.get("operationId"), - "description": operation.get("summary", "No description available."), + "description": operation.get( + "description", operation.get("summary", "No description available.") + ), "parameters": {"type": "object", "properties": {}, "required": []}, }