mirror of
https://github.com/langgenius/dify.git
synced 2026-04-20 02:37:20 +08:00
resume test
This commit is contained in:
@ -54,6 +54,7 @@ from .model import (
|
||||
MessageAgentThought,
|
||||
MessageAnnotation,
|
||||
MessageChain,
|
||||
MessageExtraContent,
|
||||
MessageFeedback,
|
||||
MessageFile,
|
||||
OperationLog,
|
||||
@ -161,6 +162,7 @@ __all__ = [
|
||||
"MessageAgentThought",
|
||||
"MessageAnnotation",
|
||||
"MessageChain",
|
||||
"MessageExtraContent",
|
||||
"MessageFeedback",
|
||||
"MessageFile",
|
||||
"OperationLog",
|
||||
|
||||
@ -87,7 +87,7 @@ class HumanInputDelivery(DefaultFieldsMixin, Base):
|
||||
nullable=False,
|
||||
)
|
||||
delivery_config_id: Mapped[str | None] = mapped_column(StringUUID, nullable=True)
|
||||
channel_payload: Mapped[None] = mapped_column(sa.Text, nullable=True)
|
||||
channel_payload: Mapped[str] = mapped_column(sa.Text, nullable=False)
|
||||
|
||||
form: Mapped[HumanInputForm] = relationship(
|
||||
"HumanInputForm",
|
||||
|
||||
@ -24,11 +24,11 @@ from libs.helper import generate_string # type: ignore[import-not-found]
|
||||
from libs.uuid_utils import uuidv7
|
||||
|
||||
from .account import Account, Tenant
|
||||
from .base import Base, TypeBase
|
||||
from .base import Base, DefaultFieldsMixin, TypeBase
|
||||
from .engine import db
|
||||
from .enums import CreatorUserRole
|
||||
from .provider_ids import GenericProviderID
|
||||
from .types import LongText, StringUUID
|
||||
from .types import EnumText, LongText, StringUUID
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from .workflow import Workflow
|
||||
@ -2065,3 +2065,19 @@ class TraceAppConfig(TypeBase):
|
||||
"created_at": str(self.created_at) if self.created_at else None,
|
||||
"updated_at": str(self.updated_at) if self.updated_at else None,
|
||||
}
|
||||
|
||||
|
||||
class MessageExtraContentType(StrEnum):
|
||||
human_input_result = auto()
|
||||
|
||||
|
||||
class MessageExtraContent(DefaultFieldsMixin):
|
||||
__tablename__ = "message_extra_contents"
|
||||
__table_args__ = (
|
||||
sa.PrimaryKeyConstraint("id", name="message_extra_content_pkey"),
|
||||
sa.Index("message_extra_content_message_id_idx", "message_id"),
|
||||
)
|
||||
|
||||
message_id = mapped_column(StringUUID, nullable=False, index=True)
|
||||
type: Mapped[MessageExtraContentType] = mapped_column(EnumText(MessageExtraContentType, length=30), nullable=False)
|
||||
content = mapped_column(sa.Text, nullable=False)
|
||||
|
||||
Reference in New Issue
Block a user