dify/api/core/tools/entities/tool_bundle.py

28 lines
618 B
Python
Raw Normal View History

from pydantic import BaseModel
2024-05-27 22:01:11 +08:00
from core.tools.entities.tool_entities import ToolParameter
2024-05-27 22:01:11 +08:00
class ApiToolBundle(BaseModel):
"""
This class is used to store the schema information of an api based tool.
such as the url, the method, the parameters, etc.
"""
# server_url
server_url: str
# method
method: str
# summary
summary: str | None = None
# operation_id
operation_id: str | None = None
# parameters
parameters: list[ToolParameter] | None = None
# author
author: str
# icon
icon: str | None = None
# openapi operation
openapi: dict