Files
dify-plugin-sdks/python/dify_plugin/protocol/dynamic_select.py
T
Yeuoly 503db4ced5 feat: add dynamic select support
- Introduced ParameterOption class for parameter options with value, label, and optional icon.
- Updated ToolParameterOption to inherit from ParameterOption.
- Added DYNAMIC_SELECT to CommonParameterType enum.
- Implemented fetch_parameter_options method in Tool class for fetching parameter options.
- Created DynamicSelectProtocol for dynamic select functionality.
- Added tests for Tool construction and parameter options fetching.
2025-06-23 18:06:19 +08:00

12 lines
272 B
Python

from typing import Protocol
from dify_plugin.entities import ParameterOption
class DynamicSelectProtocol(Protocol):
def fetch_parameter_options(self, parameter: str) -> list[ParameterOption]:
"""
Fetch the parameter options.
"""
...