exc.py 697 B

123456789101112131415161718192021222324252627
  1. class LLMNodeError(ValueError):
  2. """Base class for LLM Node errors."""
  3. class VariableNotFoundError(LLMNodeError):
  4. """Raised when a required variable is not found."""
  5. class InvalidContextStructureError(LLMNodeError):
  6. """Raised when the context structure is invalid."""
  7. class InvalidVariableTypeError(LLMNodeError):
  8. """Raised when the variable type is invalid."""
  9. class ModelNotExistError(LLMNodeError):
  10. """Raised when the specified model does not exist."""
  11. class LLMModeRequiredError(LLMNodeError):
  12. """Raised when LLM mode is required but not provided."""
  13. class NoPromptFoundError(LLMNodeError):
  14. """Raised when no prompt is found in the LLM configuration."""