dify/api/core/tools/entities/tool_bundle.py
-LAN- bab4975809
chore: add ast-grep rule to convert Optional[T] to T | None (#25560)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-15 13:06:33 +08:00

28 lines
618 B
Python

from pydantic import BaseModel
from core.tools.entities.tool_entities import ToolParameter
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