mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 20:35:19 +00:00
refac/fix: tool payload
This commit is contained in:
parent
f47a100730
commit
00084c6ca6
2 changed files with 0 additions and 2 deletions
|
|
@ -377,7 +377,6 @@ def convert_openapi_to_tool_payload(openapi_spec):
|
||||||
for method, operation in methods.items():
|
for method, operation in methods.items():
|
||||||
if operation.get("operationId"):
|
if operation.get("operationId"):
|
||||||
tool = {
|
tool = {
|
||||||
"type": "function",
|
|
||||||
"name": operation.get("operationId"),
|
"name": operation.get("operationId"),
|
||||||
"description": operation.get(
|
"description": operation.get(
|
||||||
"description",
|
"description",
|
||||||
|
|
|
||||||
|
|
@ -1320,7 +1320,6 @@ export const convertOpenApiToToolPayload = (openApiSpec) => {
|
||||||
for (const [method, operation] of Object.entries(methods)) {
|
for (const [method, operation] of Object.entries(methods)) {
|
||||||
if (operation?.operationId) {
|
if (operation?.operationId) {
|
||||||
const tool = {
|
const tool = {
|
||||||
type: 'function',
|
|
||||||
name: operation.operationId,
|
name: operation.operationId,
|
||||||
description: operation.description || operation.summary || 'No description available.',
|
description: operation.description || operation.summary || 'No description available.',
|
||||||
parameters: {
|
parameters: {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue