Timothy Jaeryang Baek преди 4 месеца
родител
ревизия
9ea6cea0ba
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      backend/open_webui/utils/tools.py

+ 3 - 1
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": []},
             }