mirror of
https://github.com/langgenius/dify.git
synced 2026-11-29 16:18:01 +08:00
16 lines
443 B
Python
16 lines
443 B
Python
from typing import Literal
|
|
|
|
|
|
class AppGenerateError(ValueError):
|
|
"""Base application-generation failure; response boundaries choose the public representation."""
|
|
|
|
|
|
class ModerationInvocationError(AppGenerateError):
|
|
"""A model moderation failure that consumers must not downgrade to a best-effort result."""
|
|
|
|
error_code: Literal["moderation_rejected", "moderation_unavailable"]
|
|
|
|
|
|
class GenerateTaskStoppedError(Exception):
|
|
pass
|