mirror of
https://github.com/langgenius/dify.git
synced 2026-03-06 16:16:38 +08:00
37 lines
1.2 KiB
Python
37 lines
1.2 KiB
Python
from collections.abc import Sequence
|
|
from typing import Any
|
|
|
|
from dify_graph.nodes.variable_assigner.common.exc import VariableOperatorNodeError
|
|
|
|
from .enums import InputType, Operation
|
|
|
|
|
|
class OperationNotSupportedError(VariableOperatorNodeError):
|
|
def __init__(self, *, operation: Operation, variable_type: str):
|
|
super().__init__(f"Operation {operation} is not supported for type {variable_type}")
|
|
|
|
|
|
class InputTypeNotSupportedError(VariableOperatorNodeError):
|
|
def __init__(self, *, input_type: InputType, operation: Operation):
|
|
super().__init__(f"Input type {input_type} is not supported for operation {operation}")
|
|
|
|
|
|
class VariableNotFoundError(VariableOperatorNodeError):
|
|
def __init__(self, *, variable_selector: Sequence[str]):
|
|
super().__init__(f"Variable {variable_selector} not found")
|
|
|
|
|
|
class InvalidInputValueError(VariableOperatorNodeError):
|
|
def __init__(self, *, value: Any):
|
|
super().__init__(f"Invalid input value {value}")
|
|
|
|
|
|
class ConversationIDNotFoundError(VariableOperatorNodeError):
|
|
def __init__(self):
|
|
super().__init__("conversation_id not found")
|
|
|
|
|
|
class InvalidDataError(VariableOperatorNodeError):
|
|
def __init__(self, message: str):
|
|
super().__init__(message)
|