mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
WIP: message extra contet
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import json
|
||||
import re
|
||||
import uuid
|
||||
from collections.abc import Mapping
|
||||
from collections.abc import Mapping, Sequence
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from enum import StrEnum, auto
|
||||
@ -1269,6 +1269,14 @@ class Message(Base):
|
||||
db.session.commit()
|
||||
return result
|
||||
|
||||
# TODO(QuantumGhost): dirty hacks, fix this later.
|
||||
def set_extra_contents(self, contents: Sequence[dict[str, Any]]) -> None:
|
||||
self._extra_contents = list(contents)
|
||||
|
||||
@property
|
||||
def extra_contents(self) -> list[dict[str, Any]]:
|
||||
return getattr(self, "_extra_contents", [])
|
||||
|
||||
@property
|
||||
def workflow_run(self):
|
||||
if self.workflow_run_id:
|
||||
|
||||
Reference in New Issue
Block a user