feat(api/workflow): Add Conversation.dialogue_count (#7275)
This commit is contained in:
parent
8f5d8397f9
commit
32dc963556
29 changed files with 205 additions and 259 deletions
|
|
@ -5,8 +5,6 @@ from typing import Any
|
|||
|
||||
from pydantic import BaseModel, ConfigDict, field_validator
|
||||
|
||||
from core.file.file_obj import FileVar
|
||||
|
||||
from .types import SegmentType
|
||||
|
||||
|
||||
|
|
@ -78,14 +76,7 @@ class IntegerSegment(Segment):
|
|||
value: int
|
||||
|
||||
|
||||
class FileSegment(Segment):
|
||||
value_type: SegmentType = SegmentType.FILE
|
||||
# TODO: embed FileVar in this model.
|
||||
value: FileVar
|
||||
|
||||
@property
|
||||
def markdown(self) -> str:
|
||||
return self.value.to_markdown()
|
||||
|
||||
|
||||
class ObjectSegment(Segment):
|
||||
|
|
@ -130,7 +121,3 @@ class ArrayObjectSegment(ArraySegment):
|
|||
value_type: SegmentType = SegmentType.ARRAY_OBJECT
|
||||
value: Sequence[Mapping[str, Any]]
|
||||
|
||||
|
||||
class ArrayFileSegment(ArraySegment):
|
||||
value_type: SegmentType = SegmentType.ARRAY_FILE
|
||||
value: Sequence[FileSegment]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue