Spaces:
Running
on
T4
Running
on
T4
File size: 745 Bytes
ab25593 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
"""
schema.py
"""
from typing import Literal, List
from pydantic import BaseModel, Field
class DialogueItem(BaseModel):
"""A single dialogue item."""
speaker: Literal["Host (Jane)", "Guest"]
text: str
class ShortDialogue(BaseModel):
"""The dialogue between the host and guest."""
scratchpad: str
name_of_guest: str
dialogue: List[DialogueItem] = Field(
..., description="A list of dialogue items, typically between 11 to 17 items"
)
class MediumDialogue(BaseModel):
"""The dialogue between the host and guest."""
scratchpad: str
name_of_guest: str
dialogue: List[DialogueItem] = Field(
..., description="A list of dialogue items, typically between 19 to 29 items"
)
|