mirror of
https://github.com/langgenius/dify-plugin-sdks.git
synced 2026-07-22 18:35:29 -04:00
503db4ced5
- 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.
12 lines
272 B
Python
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.
|
|
"""
|
|
...
|