mirror of
https://github.com/langgenius/dify.git
synced 2025-12-20 06:32:40 +00:00
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com> Co-authored-by: Novice <novice12185727@gmail.com>
32 lines
752 B
Python
32 lines
752 B
Python
from collections.abc import Mapping
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
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
|
|
# output schema
|
|
output_schema: Mapping[str, object] = Field(default_factory=dict)
|